[FFmpeg-cvslog] avfilter/vf_alphamerge: do not check for ret value if all wanted frames are present

Paul B Mahol git at videolan.org
Mon Nov 12 23:10:15 EET 2018


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Nov 12 22:07:13 2018 +0100| [23f589e073406f8c9d80092d3ff9ef8c22f27e63] | committer: Paul B Mahol

avfilter/vf_alphamerge: do not check for ret value if all wanted frames are present

It is not needed and may be uninitialized.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=23f589e073406f8c9d80092d3ff9ef8c22f27e63
---

 libavfilter/vf_alphamerge.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/libavfilter/vf_alphamerge.c b/libavfilter/vf_alphamerge.c
index d22291d205..c5602b6227 100644
--- a/libavfilter/vf_alphamerge.c
+++ b/libavfilter/vf_alphamerge.c
@@ -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);



More information about the ffmpeg-cvslog mailing list