Patch by Rafaël Carré, rafael d carre a gmail Originally committed as revision 24355 to svn://svn.ffmpeg.org/ffmpeg/trunk