]> git.sesse.net Git - ffmpeg/commitdiff
lavfi/buffersrc: Remove redundant free after ff_filter_frame() failure
authorJun Zhao <barryjzhao@tencent.com>
Wed, 1 Jan 2020 05:22:13 +0000 (13:22 +0800)
committerNicolas George <george@nsup.org>
Sat, 4 Jan 2020 18:37:39 +0000 (19:37 +0100)
ff_filter_frame() always frees the frame in case of error, so we don't
need to free the frame after ff_filter_frame() fails.

Fix CID 1457230.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
libavfilter/buffersrc.c

index 64940d91e20d4d7b8ca651e6303970aa624da5a5..bf30f54177abc97d463af670a79b04f62816767c 100644 (file)
@@ -240,10 +240,8 @@ static int av_buffersrc_add_frame_internal(AVFilterContext *ctx,
     }
 
     ret = ff_filter_frame(ctx->outputs[0], copy);
-    if (ret < 0) {
-        av_frame_free(&copy);
+    if (ret < 0)
         return ret;
-    }
 
     if ((flags & AV_BUFFERSRC_FLAG_PUSH)) {
         ret = push_frame(ctx->graph);