Browse Source

lavfi/buffersrc: Remove redundant free after ff_filter_frame() failure

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>
tags/n4.3
Jun Zhao Nicolas George 5 years ago
parent
commit
304eaa63a9
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      libavfilter/buffersrc.c

+ 1
- 3
libavfilter/buffersrc.c View 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);


Loading…
Cancel
Save