patch by Sisir Koppaka, sisir.koppaka gmail com Originally committed as revision 12921 to svn://svn.ffmpeg.org/ffmpeg/trunk