Tested on CamStudio sample files. Originally committed as revision 4840 to svn://svn.ffmpeg.org/ffmpeg/trunk