It's a bit more complicated than that. The Hungarian revolution was at first met with cautious support from ethnic minorities, if for no other reason then because Kossuth's program involved abolishing serfdom.
Then the Hungarian leadership took an explicitly and inflexibly unitarist role, refusing to address demands for language-rights and self-government by the Serbs, Slovaks, Romanians etc. Austria exploited the conflict and drew them to her side with a much better set of promises (of course, later it betrayed most of those promises).
So had revolutionary Hungary been more willing to grant strong cultural autonomy for minorities and at least consider a federal solution, it would have had a much better chance of staying independent.
(and that's not impossible - after all, Kossuth regretted not coming to an agreement with the Romanians and Serbs...only, somehow he needs to realize the virtues of compromise in time rather than regret it when it's all too late)