[FFmpeg-cvslog] avfilter/asrc_afirsrc: fix by one smaller allocation of buffer

Paul B Mahol git at videolan.org
Thu Nov 23 16:02:41 EET 2023


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Nov 23 14:58:35 2023 +0100| [4adb93dff05dd947878c67784d98c9a4e13b57a7] | committer: Paul B Mahol

avfilter/asrc_afirsrc: fix by one smaller allocation of buffer

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4adb93dff05dd947878c67784d98c9a4e13b57a7
---

 libavfilter/asrc_afirsrc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/asrc_afirsrc.c b/libavfilter/asrc_afirsrc.c
index e2359c159f..ea04c35759 100644
--- a/libavfilter/asrc_afirsrc.c
+++ b/libavfilter/asrc_afirsrc.c
@@ -480,7 +480,7 @@ static av_cold int config_eq_output(AVFilterLink *outlink)
         if (ret < 0)
             return ret;
 
-        s->magnitude = av_calloc(s->nb_magnitude, sizeof(*s->magnitude));
+        s->magnitude = av_calloc(s->nb_magnitude + 1, sizeof(*s->magnitude));
         if (!s->magnitude)
             return AVERROR(ENOMEM);
         memcpy(s->magnitude, eq_presets[s->preset].gains, sizeof(*s->magnitude) * s->nb_magnitude);



More information about the ffmpeg-cvslog mailing list