Patch by Erik Slagter Originally committed as revision 20774 to svn://svn.ffmpeg.org/ffmpeg/trunk
Originally committed as revision 16584 to svn://svn.ffmpeg.org/ffmpeg/trunk