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