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:
parent
a28d4f86af
commit
64e105e051
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user