Patch by Michel Bardiaux, mbardiaux mediaxim be. Originally committed as revision 7826 to svn://svn.ffmpeg.org/ffmpeg/trunk