patch by Piero Bugoni, crboca32 yahoo com Originally committed as revision 8281 to svn://svn.ffmpeg.org/ffmpeg/trunk