patch by Stefano Sabatini, stefano.sabatini-lala poste it Originally committed as revision 13005 to svn://svn.ffmpeg.org/ffmpeg/trunk
Originally committed as revision 12525 to svn://svn.ffmpeg.org/ffmpeg/trunk
Originally committed as revision 10903 to svn://svn.ffmpeg.org/ffmpeg/trunk