OSDN Git Service

Make size variables in dyn_buf_write unsigned so gcc will not optimize the
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sat, 4 Oct 2008 21:11:58 +0000 (21:11 +0000)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sat, 4 Oct 2008 21:11:58 +0000 (21:11 +0000)
check away (due to assuming signed overflows do not happen).

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

libavformat/aviobuf.c

index ac7bb8f..46458db 100644 (file)
@@ -711,7 +711,7 @@ typedef struct DynBuffer {
 static int dyn_buf_write(void *opaque, uint8_t *buf, int buf_size)
 {
     DynBuffer *d = opaque;
-    int new_size, new_allocated_size;
+    unsigned new_size, new_allocated_size;
 
     /* reallocate buffer if needed */
     new_size = d->pos + buf_size;