patch by Michael Benjamin, neuroptik gmail com Originally committed as revision 6282 to svn://svn.ffmpeg.org/ffmpeg/trunk