Patch by Reinhard Tartler (siretart AT tauware DOT de). Originally committed as revision 21004 to svn://svn.ffmpeg.org/ffmpeg/trunk