avfilter/vf_colorkey: Don't manually make frame writable

Instead, set AVFilterPad.needs_writable.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
pull/364/head
Andreas Rheinhardt 3 years ago
parent ce2a77b52e
commit 631c4db13b
  1. 4
      libavfilter/vf_colorkey.c

@ -135,9 +135,6 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
ColorkeyContext *ctx = avctx->priv; ColorkeyContext *ctx = avctx->priv;
int res; int res;
if (res = av_frame_make_writable(frame))
return res;
if (res = ff_filter_execute(avctx, ctx->do_slice, frame, NULL, if (res = ff_filter_execute(avctx, ctx->do_slice, frame, NULL,
FFMIN(frame->height, ff_filter_get_nb_threads(avctx)))) FFMIN(frame->height, ff_filter_get_nb_threads(avctx))))
return res; return res;
@ -180,6 +177,7 @@ static const AVFilterPad colorkey_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 }
}; };

Loading…
Cancel
Save