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