patch by Kurtnoise, kurtnoise free fr Originally committed as revision 14756 to svn://svn.ffmpeg.org/ffmpeg/trunk