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