[FFmpeg-cvslog] avfilter/af_anequalizer: fix off by one in reallocation
Paul B Mahol
git at videolan.org
Sat Mar 14 20:40:43 EET 2020
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Mar 14 19:39:04 2020 +0100| [6fbc7f092e7c8d405f3fb38f0b550e12156601c4] | committer: Paul B Mahol
avfilter/af_anequalizer: fix off by one in reallocation
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6fbc7f092e7c8d405f3fb38f0b550e12156601c4
---
libavfilter/af_anequalizer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/af_anequalizer.c b/libavfilter/af_anequalizer.c
index c974fd5abc..177e1c7b39 100644
--- a/libavfilter/af_anequalizer.c
+++ b/libavfilter/af_anequalizer.c
@@ -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));
More information about the ffmpeg-cvslog
mailing list