patch by Luca Abeni, lucabe72 **at&& email ^^dot## it Originally committed as revision 4919 to svn://svn.ffmpeg.org/ffmpeg/trunk