Patch by: Ramiro Polla <ramiro <DOT> polla gmail <DOT> com> Originally committed as revision 26394 to svn://svn.ffmpeg.org/ffmpeg/trunk