Patch by "S.N. Hemanth Meenakshisundaram" /smeenaks/ucsd/edu. Originally committed as revision 25189 to svn://svn.ffmpeg.org/ffmpeg/trunk