I keep the "accept cookies from sites" option un-checked in my Firefox preferences and maintain a (short) list of websites that I allow cookies from.
Even though I have "allow for session" set for www.youtube.com, it still comes up with "An error occurred" when I try to play a video. If I check "accept cookies from sites" and reload the page, it works even though no cookie that's not already on my whitelist shows up.
Which is a pain because I have to change that setting, reload the page, watch the video and then remember to change the setting back to not accept cookies again.
I just found the fix.
www.youtube.com is already on my "accept for session" cookie exception list.
Adding youtube.com (note no www in that) to that list manually (under Edit-Prefrences-Privacy-Exceptions) solves the problem..