Patch by Howard Chu, hyc at highlandsun dot com Originally committed as revision 23155 to svn://svn.ffmpeg.org/ffmpeg/trunk