1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

avfilter/vf_despill: Don't manually make frame writable

Instead, set AVFilterPad.needs_writable.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2021-08-01 22:13:26 +02:00
parent 6140eb720e
commit ce2a77b52e

View File

@@ -94,9 +94,6 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
AVFilterContext *ctx = link->dst; AVFilterContext *ctx = link->dst;
int ret; int ret;
if (ret = av_frame_make_writable(frame))
return ret;
if (ret = ff_filter_execute(ctx, do_despill_slice, frame, NULL, if (ret = ff_filter_execute(ctx, do_despill_slice, frame, NULL,
FFMIN(frame->height, ff_filter_get_nb_threads(ctx)))) FFMIN(frame->height, ff_filter_get_nb_threads(ctx))))
return ret; return ret;
@@ -135,6 +132,7 @@ static const AVFilterPad despill_inputs[] = {
.name = "default", .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.filter_frame = filter_frame, .filter_frame = filter_frame,
.needs_writable = 1,
}, },
{ NULL } { NULL }
}; };