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/avf_avectorscope.c | |
parent | 78f46065d861eb8487124e92ab46a459426eb89c (diff) | |
download | ffmpeg-e506ea3ce1de0c782b2b833398240c8e19a02bb4.tar.gz |
avfilter: use ff_inlink_make_frame_writable()
Diffstat (limited to 'libavfilter/avf_avectorscope.c')
-rw-r--r-- | libavfilter/avf_avectorscope.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavfilter/avf_avectorscope.c b/libavfilter/avf_avectorscope.c index 3927d80b42..6e45fd9575 100644 --- a/libavfilter/avf_avectorscope.c +++ b/libavfilter/avf_avectorscope.c @@ -297,6 +297,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) unsigned x, y; unsigned prev_x = s->prev_x, prev_y = s->prev_y; double zoom = s->zoom; + int ret; if (!s->outpicref || s->outpicref->width != outlink->w || s->outpicref->height != outlink->h) { @@ -314,7 +315,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) s->outpicref->pts = av_rescale_q(insamples->pts, inlink->time_base, outlink->time_base); s->outpicref->duration = 1; - av_frame_make_writable(s->outpicref); + ret = ff_inlink_make_frame_writable(outlink, &s->outpicref); + if (ret < 0) { + av_frame_free(&insamples); + return ret; + } ff_filter_execute(ctx, fade, NULL, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx))); if (zoom < 1) { |