Patch by Dave Yeo, daveryeo at telus dot net Originally committed as revision 22425 to svn://svn.ffmpeg.org/ffmpeg/trunk