From 74853ed3f845212f4092e7b7e89dc2262926f4f5 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 25 Jun 2012 13:16:57 +0200 Subject: [PATCH] avconv: shut up an uninitialized variable warning. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/avconv.c b/avconv.c index ff06bceafd..7aacbe0da7 100644 --- 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;