diff mbox series

[FFmpeg-devel,3/6] avfilter/vf_lumakey: Don't manually make frame writable

Message ID AM7PR03MB66607898F06D071CEB3781338FEE9@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Headers show
Series [FFmpeg-devel,1/6] avfilter/af_aderivative: Don't use audiobuf for only 1 sample, fix leak | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Aug. 1, 2021, 9:15 p.m. UTC
Instead, set AVFilterPad.needs_writable.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/vf_lumakey.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/vf_lumakey.c b/libavfilter/vf_lumakey.c
index 3f98d5077d..f6bb889343 100644
--- a/libavfilter/vf_lumakey.c
+++ b/libavfilter/vf_lumakey.c
@@ -135,9 +135,6 @@  static int filter_frame(AVFilterLink *link, AVFrame *frame)
     LumakeyContext *s = ctx->priv;
     int ret;
 
-    if (ret = av_frame_make_writable(frame))
-        return ret;
-
     if (ret = ctx->internal->execute(ctx, s->do_lumakey_slice, frame, NULL, FFMIN(frame->height, ff_filter_get_nb_threads(ctx))))
         return ret;
 
@@ -181,6 +178,7 @@  static const AVFilterPad lumakey_inputs[] = {
         .type         = AVMEDIA_TYPE_VIDEO,
         .filter_frame = filter_frame,
         .config_props = config_input,
+        .needs_writable = 1,
     },
     { NULL }
 };