Patch by James Zern, jzern google Originally committed as revision 24223 to svn://svn.ffmpeg.org/ffmpeg/trunk