1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Jun Zhao 2020-01-01 13:22:13 +08:00 committed by Nicolas George
parent 389865352d
commit 304eaa63a9

View File

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