Fix a potential endless loop (nb (1 * 3) / 2 == 1)

Originally committed as revision 823 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Philip Gladstone 2002-07-27 03:05:45 +00:00
parent a28d4f86af
commit 64e105e051

View File

@ -519,7 +519,7 @@ static void dyn_buf_write(void *opaque, UINT8 *buf, int buf_size)
if (!new_allocated_size)
new_allocated_size = new_size;
else
new_allocated_size = (new_allocated_size * 3) / 2;
new_allocated_size = (new_allocated_size * 3) / 2 + 1;
}
if (new_allocated_size > d->allocated_size) {