[FFmpeg-cvslog] avfilter/avf_showspectrum: set hop_size for showspectrumpic

Paul B Mahol git at videolan.org
Mon Nov 21 16:43:52 EET 2022


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Nov 21 15:44:44 2022 +0100| [3e288dbf56da7213b1ca656f19bd216a9ba90929] | committer: Paul B Mahol

avfilter/avf_showspectrum: set hop_size for showspectrumpic

Fixes invalid spikes in video output.

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

 libavfilter/avf_showspectrum.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
index 01969287cd..24a424a34a 100644
--- a/libavfilter/avf_showspectrum.c
+++ b/libavfilter/avf_showspectrum.c
@@ -1770,6 +1770,7 @@ static int showspectrumpic_request_frame(AVFilterLink *outlink)
 
         spf = s->win_size * (s->samples / ((s->win_size * sz) * ceil(s->samples / (float)(s->win_size * sz))));
         spf = FFMAX(1, spf);
+        s->hop_size = spf;
 
         spb = (s->samples / (spf * sz)) * spf;
 



More information about the ffmpeg-cvslog mailing list