based on patch by Marcus Engene, ffmpeg AATT engene DDOOTT se Originally committed as revision 5295 to svn://svn.ffmpeg.org/ffmpeg/trunk