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