Patch by Francesco Lavra (firstnamelastname@interfree.it) Originally committed as revision 23575 to svn://svn.ffmpeg.org/ffmpeg/trunk