[FFmpeg-devel] [PATCH 4/6] avfilter/vf_despill: Don't manually make frame writable

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Mon Aug 2 00:15:31 EEST 2021


Instead, set AVFilterPad.needs_writable.

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

diff --git a/libavfilter/vf_despill.c b/libavfilter/vf_despill.c
index e0990d7443..6826d7abda 100644
--- a/libavfilter/vf_despill.c
+++ b/libavfilter/vf_despill.c
@@ -94,9 +94,6 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
     AVFilterContext *ctx = link->dst;
     int ret;
 
-    if (ret = av_frame_make_writable(frame))
-        return ret;
-
     if (ret = ctx->internal->execute(ctx, do_despill_slice, frame, NULL, FFMIN(frame->height, ff_filter_get_nb_threads(ctx))))
         return ret;
 
@@ -139,6 +136,7 @@ static const AVFilterPad despill_inputs[] = {
         .name         = "default",
         .type         = AVMEDIA_TYPE_VIDEO,
         .filter_frame = filter_frame,
+        .needs_writable = 1,
     },
     { NULL }
 };
-- 
2.30.2



More information about the ffmpeg-devel mailing list