patch by David Conrad umovimus _at_ gmail.com Originally committed as revision 9215 to svn://svn.ffmpeg.org/ffmpeg/trunk