Patch by Daniel Kang, daniel.d.kang at gmail Originally committed as revision 26188 to svn://svn.ffmpeg.org/ffmpeg/trunk