Patch by Colin McQuillan ( m.niloc googlemail com ) Originally committed as revision 19574 to svn://svn.ffmpeg.org/ffmpeg/trunk