Patch by James Zern for Google, Inc., jzern google com Originally committed as revision 23303 to svn://svn.ffmpeg.org/ffmpeg/trunk