Fix a condition that causes an infinite loop, but only when compiled with
gcc 4.2.4 on x86_32. Thanks to Vitor for hunting this down.

Originally committed as revision 17802 to svn://svn.ffmpeg.org/ffmpeg/trunk
