When ever I watch any videos on youtube or else where I am afraid that firefox is going to crash. I has happened to me several times. In fact I can not close firefox after that and I can not open a new instance of it. Usually I would have to restart the comp! Now though I have solved the problem. What you need to do is type the following in the shell!
I agree with Big-E, it may be possible that the errors comes from the plugin flash and not from the browser, although is possible that you can discard such thing by trying with other browsers that use the same pluggin but even then isn't mean necessarily that is firefox's error.
I remember having the same issue sometime ago (like a month or such), it sucks because many times I was with like 15 tabs and suddenly clicked on a link that it turns out to be a page with flash, god I hated that ^^
Also, I remember that there was a time when my problems were with opera while firefox worked pretty well with flash sites, but if I recall well, many of the problems started when the new versions of the flash plugin came out (>= 9.x)
had this problem today and just fixed it. (useing FF3 and ubuntu) youtube videos would not even play just a black box or would lock, all kinds of errors
what i did is "sudo apt-get remove gnash"
after gnash is removed goto the menu where it shows all your firefox plugins in the browser, disable flash v8 (in my case i had 2 flash 8 and 9 installed) i just disabled 8 then re-enabled it