patch by elupus elupus _at_ ecce _dot_ se Originally committed as revision 13748 to svn://svn.ffmpeg.org/ffmpeg/trunk