aboutsummaryrefslogtreecommitdiffstats
path: root/libav
diff options
context:
space:
mode:
authorPhilip Gladstone <philipjsg@users.sourceforge.net>2002-07-27 03:05:45 +0000
committerPhilip Gladstone <philipjsg@users.sourceforge.net>2002-07-27 03:05:45 +0000
commit64e105e051ca3e5088b0db64551244482b2836b4 (patch)
tree0afc9f32fbd5aaff8a0dc650cb0bd086d3750edf /libav
parenta28d4f86af7f50eb7eda9f79b11a33c4f3cf3a3e (diff)
downloadffmpeg-64e105e051ca3e5088b0db64551244482b2836b4.tar.gz
Fix a potential endless loop (nb (1 * 3) / 2 == 1)
Originally committed as revision 823 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libav')
-rw-r--r--libav/aviobuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libav/aviobuf.c b/libav/aviobuf.c
index 71f4b64dc7..6c23088d91 100644
--- a/libav/aviobuf.c
+++ b/libav/aviobuf.c
@@ -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) {