Commit ea096318 authored by Paul B Mahol's avatar Paul B Mahol

avfilter/af_alimiter: check if buffer_size is valid

Fixes #7050.
Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 1b1362e4
......@@ -327,6 +327,11 @@ static int config_input(AVFilterLink *inlink)
s->buffer_size = inlink->sample_rate * s->attack * inlink->channels;
s->buffer_size -= s->buffer_size % inlink->channels;
if (s->buffer_size <= 0) {
av_log(ctx, AV_LOG_ERROR, "Attack is too small.\n");
return AVERROR(EINVAL);
}
return 0;
}
......
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