avfilter/af_sidechaincompress: Also assert that i < 2
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 3 Sep 2015 21:13:24 +0000 (23:13 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 3 Sep 2015 21:13:24 +0000 (23:13 +0200)
This should help static analyzers (CID1322339)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavfilter/af_sidechaincompress.c

index f555563..afae9be 100644 (file)
@@ -161,7 +161,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
     for (i = 0; i < 2; i++)
         if (link == ctx->inputs[i])
             break;
-    av_assert0(!s->input_frame[i]);
+    av_assert0(i < 2 && !s->input_frame[i]);
     s->input_frame[i] = frame;
 
     if (!s->input_frame[0] || !s->input_frame[1])