Originally committed as revision 8674 to svn://svn.ffmpeg.org/ffmpeg/trunk
patch by Anssi Hannula, anssi.hannula gmail com Originally committed as revision 8643 to svn://svn.ffmpeg.org/ffmpeg/trunk