Based on a patch by Nicolas George <@var{name}.@var{surname}@@normalesup.@code{org}>. Originally committed as revision 25709 to svn://svn.ffmpeg.org/ffmpeg/trunk