Originally committed as revision 23904 to svn://svn.ffmpeg.org/ffmpeg/trunk
Patch by James Darnley <james darnley at gmail>. Originally committed as revision 22605 to svn://svn.ffmpeg.org/ffmpeg/trunk