patch by Peter Ross, pross xvid org Originally committed as revision 13884 to svn://svn.ffmpeg.org/ffmpeg/trunk