patch by Carl Eugen Hoyos [cehoyos * ag or at] Originally committed as revision 9981 to svn://svn.ffmpeg.org/ffmpeg/trunk