avfilter/vf_alphamerge: do not check for ret value if all wanted frames are present
authorPaul B Mahol <onemda@gmail.com>
Mon, 12 Nov 2018 21:07:13 +0000 (22:07 +0100)
committerPaul B Mahol <onemda@gmail.com>
Mon, 12 Nov 2018 21:07:13 +0000 (22:07 +0100)
It is not needed and may be uninitialized.

libavfilter/vf_alphamerge.c

index d22291d..c5602b6 100644 (file)
@@ -154,13 +154,11 @@ static int activate(AVFilterContext *ctx)
     }
 
     if (s->main_frame && s->alpha_frame) {
-        if (ret > 0) {
-            draw_frame(ctx, s->main_frame, s->alpha_frame);
-            ret = ff_filter_frame(outlink, s->main_frame);
-            av_frame_free(&s->alpha_frame);
-            s->main_frame = NULL;
-            return ret;
-        }
+        draw_frame(ctx, s->main_frame, s->alpha_frame);
+        ret = ff_filter_frame(outlink, s->main_frame);
+        av_frame_free(&s->alpha_frame);
+        s->main_frame = NULL;
+        return ret;
     }
 
     FF_FILTER_FORWARD_STATUS(ctx->inputs[0], outlink);