patch by Adam Hoka, ahoka NetBSD org Originally committed as revision 19190 to svn://svn.ffmpeg.org/ffmpeg/trunk