OSDN Git Service

Merge declaration and initialization
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Mon, 12 Oct 2009 16:38:08 +0000 (16:38 +0000)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Mon, 12 Oct 2009 16:38:08 +0000 (16:38 +0000)
Originally committed as revision 20214 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/aviobuf.c

index dd6f9b6..268326d 100644 (file)
@@ -104,10 +104,8 @@ void put_byte(ByteIOContext *s, int b)
 
 void put_buffer(ByteIOContext *s, const unsigned char *buf, int size)
 {
-    int len;
-
     while (size > 0) {
-        len = FFMIN(s->buf_end - s->buf_ptr, size);
+        int len = FFMIN(s->buf_end - s->buf_ptr, size);
         memcpy(s->buf_ptr, buf, len);
         s->buf_ptr += len;