avconv: shut up an uninitialized variable warning.
authorAnton Khirnov <anton@khirnov.net>
Mon, 25 Jun 2012 11:16:57 +0000 (13:16 +0200)
committerAnton Khirnov <anton@khirnov.net>
Tue, 26 Jun 2012 17:31:51 +0000 (19:31 +0200)
The warning silenced was:
avconv.c: In function ‘configure_filtergraph’:
avconv.c:603:8: warning: ‘ist’ may be used uninitialized in this function [-Wuninitialized]
avconv.c:549:18: note: ‘ist’ was declared here

avconv.c

index ff06bce..7aacbe0 100644 (file)
--- a/avconv.c
+++ b/avconv.c
@@ -546,7 +546,7 @@ static FilterGraph *init_simple_filtergraph(InputStream *ist, OutputStream *ost)
 
 static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
 {
-    InputStream *ist;
+    InputStream *ist = NULL;
     enum AVMediaType type = avfilter_pad_get_type(in->filter_ctx->input_pads, in->pad_idx);
     int i;
 
@@ -598,6 +598,8 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
             exit_program(1);
         }
     }
+    av_assert0(ist);
+
     ist->discard         = 0;
     ist->decoding_needed = 1;
     ist->st->discard = AVDISCARD_NONE;