diff options
author | Paul B Mahol <onemda@gmail.com> | 2023-02-06 14:57:50 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2023-02-12 13:32:00 +0100 |
commit | e506ea3ce1de0c782b2b833398240c8e19a02bb4 (patch) | |
tree | 09a019d09e096300024c435d15c3485d319bad04 /libavfilter/vf_vidstabdetect.c | |
parent | 78f46065d861eb8487124e92ab46a459426eb89c (diff) | |
download | ffmpeg-e506ea3ce1de0c782b2b833398240c8e19a02bb4.tar.gz |
avfilter: use ff_inlink_make_frame_writable()
Diffstat (limited to 'libavfilter/vf_vidstabdetect.c')
-rw-r--r-- | libavfilter/vf_vidstabdetect.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libavfilter/vf_vidstabdetect.c b/libavfilter/vf_vidstabdetect.c index 62b998e171..b27b1e40a6 100644 --- a/libavfilter/vf_vidstabdetect.c +++ b/libavfilter/vf_vidstabdetect.c @@ -27,6 +27,7 @@ #include "libavutil/opt.h" #include "libavutil/pixdesc.h" #include "avfilter.h" +#include "filters.h" #include "internal.h" #include "vidstabutils.h" @@ -149,10 +150,15 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) AVFilterLink *outlink = inlink->dst->outputs[0]; VSFrame frame; - int plane; + int plane, ret; - if (s->conf.show > 0 && !av_frame_is_writable(in)) - av_frame_make_writable(in); + if (s->conf.show > 0 && !av_frame_is_writable(in)) { + ret = ff_inlink_make_frame_writable(inlink, &in); + if (ret < 0) { + av_frame_free(&in); + return ret; + } + } for (plane = 0; plane < md->fi.planes; plane++) { frame.data[plane] = in->data[plane]; |