Patch by Panagiotis Issaris Originally committed as revision 6205 to svn://svn.ffmpeg.org/ffmpeg/trunk