patch by Vitor vitor1001 gmail com Originally committed as revision 8922 to svn://svn.ffmpeg.org/ffmpeg/trunk