Originally committed as revision 13098 to svn://svn.ffmpeg.org/ffmpeg/trunk
Patch by Eli Friedman (eli friedman gmail com) Originally committed as revision 12649 to svn://svn.ffmpeg.org/ffmpeg/trunk