patch by Ronald S. Bultje, rsbultje gmail com Originally committed as revision 11374 to svn://svn.ffmpeg.org/ffmpeg/trunk