Patch by Frank Barchard, fbarchard google com Originally committed as revision 20239 to svn://svn.ffmpeg.org/ffmpeg/trunk