patch by Daniel Serpell, dserpell gmail com Originally committed as revision 14760 to svn://svn.ffmpeg.org/ffmpeg/trunk