[FFmpeg-cvslog] lavfi/buffersrc: Remove redundant free after ff_filter_frame() failure
Jun Zhao
git at videolan.org
Sat Jan 4 20:44:09 EET 2020
ffmpeg | branch: master | Jun Zhao <barryjzhao at tencent.com> | Wed Jan 1 13:22:13 2020 +0800| [304eaa63a993e9c926832b44069f6814c527d026] | committer: Nicolas George
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 at tencent.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=304eaa63a993e9c926832b44069f6814c527d026
---
libavfilter/buffersrc.c | 4 +---
1 file changed, 1 insertion(+), 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);
More information about the ffmpeg-cvslog
mailing list