mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avfilter/af_alimiter: check if buffer_size is valid
Fixes #7050. Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
1b1362e408
commit
ea0963181a
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user