Patch by Michele Orrù reverse(<moc.liamg@yp.rekam>). Originally committed as revision 21666 to svn://svn.ffmpeg.org/ffmpeg/trunk