[FFmpeg-cvslog] avfilter/vf_lumakey: Don't manually make frame writable

Andreas Rheinhardt git at videolan.org
Mon Aug 16 00:16:01 EEST 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sun Aug  1 22:13:26 2021 +0200| [6140eb720e53f9c9bd6f4f7c2bdb43161527109c] | committer: Andreas Rheinhardt

avfilter/vf_lumakey: Don't manually make frame writable

Instead, set AVFilterPad.needs_writable.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6140eb720e53f9c9bd6f4f7c2bdb43161527109c
---

 libavfilter/vf_lumakey.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavfilter/vf_lumakey.c b/libavfilter/vf_lumakey.c
index 763c5098ba..d59ad2d5ba 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 = ff_filter_execute(ctx, s->do_lumakey_slice, frame, NULL,
                                 FFMIN(frame->height, ff_filter_get_nb_threads(ctx))))
         return ret;
@@ -177,6 +174,7 @@ static const AVFilterPad lumakey_inputs[] = {
         .type         = AVMEDIA_TYPE_VIDEO,
         .filter_frame = filter_frame,
         .config_props = config_input,
+        .needs_writable = 1,
     },
     { NULL }
 };



More information about the ffmpeg-cvslog mailing list