mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avfilter/avf_avectorscope: check if clone frame is set
This commit is contained in:
parent
4e1ae43b17
commit
f9897eda43
@ -238,6 +238,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
|
|||||||
AudioVectorScopeContext *s = ctx->priv;
|
AudioVectorScopeContext *s = ctx->priv;
|
||||||
const int hw = s->hw;
|
const int hw = s->hw;
|
||||||
const int hh = s->hh;
|
const int hh = s->hh;
|
||||||
|
AVFrame *clone;
|
||||||
unsigned x, y;
|
unsigned x, y;
|
||||||
unsigned prev_x = s->prev_x, prev_y = s->prev_y;
|
unsigned prev_x = s->prev_x, prev_y = s->prev_y;
|
||||||
double zoom = s->zoom;
|
double zoom = s->zoom;
|
||||||
@ -360,7 +361,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
|
|||||||
s->prev_x = x, s->prev_y = y;
|
s->prev_x = x, s->prev_y = y;
|
||||||
av_frame_free(&insamples);
|
av_frame_free(&insamples);
|
||||||
|
|
||||||
return ff_filter_frame(outlink, av_frame_clone(s->outpicref));
|
clone = av_frame_clone(s->outpicref);
|
||||||
|
if (!clone)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
|
return ff_filter_frame(outlink, clone);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int activate(AVFilterContext *ctx)
|
static int activate(AVFilterContext *ctx)
|
||||||
|
Loading…
Reference in New Issue
Block a user