Patch by Thierry Foucu, tfoucu gmail Originally committed as revision 23017 to svn://svn.ffmpeg.org/ffmpeg/trunk