mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avfilter/avf_ahistogram: check if frame clone is set
This commit is contained in:
parent
928020b9d0
commit
d580c7a797
@ -163,6 +163,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
|
|||||||
const int w = s->w;
|
const int w = s->w;
|
||||||
int c, y, n, p, bin;
|
int c, y, n, p, bin;
|
||||||
uint64_t acmax = 1;
|
uint64_t acmax = 1;
|
||||||
|
AVFrame *clone;
|
||||||
|
|
||||||
if (!s->out || s->out->width != outlink->w ||
|
if (!s->out || s->out->width != outlink->w ||
|
||||||
s->out->height != outlink->h) {
|
s->out->height != outlink->h) {
|
||||||
@ -363,7 +364,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
|
|||||||
s->ypos = H;
|
s->ypos = H;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ff_filter_frame(outlink, av_frame_clone(s->out));
|
clone = av_frame_clone(s->out);
|
||||||
|
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