mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avfilter/af_anequalizer: fix off by one in reallocation
This commit is contained in:
parent
fa5bff611d
commit
6fbc7f092e
@ -566,7 +566,7 @@ static void equalizer(EqualizatorFilter *f, double sample_rate)
|
||||
static int add_filter(AudioNEqualizerContext *s, AVFilterLink *inlink)
|
||||
{
|
||||
equalizer(&s->filters[s->nb_filters], inlink->sample_rate);
|
||||
if (s->nb_filters >= s->nb_allocated) {
|
||||
if (s->nb_filters >= s->nb_allocated - 1) {
|
||||
EqualizatorFilter *filters;
|
||||
|
||||
filters = av_calloc(s->nb_allocated, 2 * sizeof(*s->filters));
|
||||
|
Loading…
Reference in New Issue
Block a user