Patch by Yann Coupin, yann.coupin+ffmpeg gmail Originally committed as revision 22020 to svn://svn.ffmpeg.org/ffmpeg/trunk