Merge declaration and initialization of io_buffer_size
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Fri, 16 Jan 2009 16:39:17 +0000 (16:39 +0000)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Fri, 16 Jan 2009 16:39:17 +0000 (16:39 +0000)
Originally committed as revision 16639 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/aviobuf.c

index f3a62fe..93efd65 100644 (file)
@@ -784,12 +784,7 @@ static int url_open_dyn_buf_internal(ByteIOContext **s, int max_packet_size)
 {
     DynBuffer *d;
     int ret;
-    unsigned io_buffer_size;
-
-    if (max_packet_size)
-        io_buffer_size = max_packet_size;
-    else
-        io_buffer_size = 1024;
+    unsigned io_buffer_size = max_packet_size ? max_packet_size : 1024;
 
     if(sizeof(DynBuffer) + io_buffer_size < io_buffer_size)
         return -1;