Originally committed as revision 25894 to svn://svn.ffmpeg.org/ffmpeg/trunk
This fixes roundup issue 2390. Originally committed as revision 25889 to svn://svn.ffmpeg.org/ffmpeg/trunk