diff options
author | Jun Zhao <barryjzhao@tencent.com> | 2020-01-01 13:22:13 +0800 |
---|---|---|
committer | Nicolas George <george@nsup.org> | 2020-01-04 19:37:39 +0100 |
commit | 304eaa63a993e9c926832b44069f6814c527d026 (patch) | |
tree | f6e19760b5acc9bf2becacfdcf6d823a45a811d1 | |
parent | 389865352de8fe7cc46241e8c2843a46a776acdf (diff) | |
download | ffmpeg-304eaa63a993e9c926832b44069f6814c527d026.tar.gz |
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>
-rw-r--r-- | libavfilter/buffersrc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c index 64940d91e2..bf30f54177 100644 --- a/libavfilter/buffersrc.c +++ b/libavfilter/buffersrc.c @@ -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(©); + if (ret < 0) return ret; - } if ((flags & AV_BUFFERSRC_FLAG_PUSH)) { ret = push_frame(ctx->graph); |