[FFmpeg-cvslog] avfilter/af_superequalizer: stop extending last frame duration

Paul B Mahol git at videolan.org
Wed Feb 16 18:28:00 EET 2022


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Feb 16 17:12:25 2022 +0100| [52218c0322d422fd43c5d804c2cb7e447cb07836] | committer: Paul B Mahol

avfilter/af_superequalizer: stop extending last frame duration

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

 libavfilter/af_superequalizer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/af_superequalizer.c b/libavfilter/af_superequalizer.c
index 58ad85653d..420bb7019c 100644
--- a/libavfilter/af_superequalizer.c
+++ b/libavfilter/af_superequalizer.c
@@ -195,7 +195,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
     float *fsamples = s->fsamples;
     int ch, i;
 
-    AVFrame *out = ff_get_audio_buffer(outlink, s->winlen);
+    AVFrame *out = ff_get_audio_buffer(outlink, in->nb_samples);
     float *src, *dst, *ptr;
 
     if (!out) {
@@ -231,7 +231,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
             dst[i] += fsamples[i] / s->tabsize;
         for (i = s->winlen; i < s->tabsize; i++)
             dst[i]  = fsamples[i] / s->tabsize;
-        for (i = 0; i < s->winlen; i++)
+        for (i = 0; i < out->nb_samples; i++)
             ptr[i] = dst[i];
         for (i = 0; i < s->winlen; i++)
             dst[i] = dst[i+s->winlen];



More information about the ffmpeg-cvslog mailing list