Patch by Steve Lhomme <slhomme at divxcorp com> Originally committed as revision 5206 to svn://svn.ffmpeg.org/ffmpeg/trunk