Commit e7c5dbb4 authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter/avf_ahistogram: raise minimum acmax to 1

If acmax can be 0 then it could result in a division by 0
Fixes CID1351345
Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 8e069eb5
......@@ -165,7 +165,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
const int H = s->histogram_h;
const int w = s->w;
int c, y, n, p, bin;
uint64_t acmax = 0;
uint64_t acmax = 1;
if (!s->out || s->out->width != outlink->w ||
s->out->height != outlink->h) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment