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