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