Created attachment 504052[details][diff][review]
Patch version 1.
This was actually a libtheora bug. I've just committed a patch upstream in r17780. This was harmless (instead of clearing the desired reference frame, it actually cleared most of the current frame's buffer, and some of the padding to the side), but did lead to unpredictable output for streams that started without a keyframe.
For reference, the file that triggered this behavior was content/media/test/bug498380.ogv
I've verified on a local 64-bit Linux build that this fixes the problem.