Originally committed as revision 4121 to svn://svn.ffmpeg.org/ffmpeg/trunk
fixups by me. Originally committed as revision 4113 to svn://svn.ffmpeg.org/ffmpeg/trunk