aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2022-11-21 15:44:44 +0100
committerPaul B Mahol <onemda@gmail.com>2022-11-21 15:47:02 +0100
commit3e288dbf56da7213b1ca656f19bd216a9ba90929 (patch)
treee3cc126cfe83a39ebad3569c5d39b9d8da4ca407 /libavfilter
parent459527108ad409c026da93e9f49f4d3006c0f2f9 (diff)
downloadffmpeg-3e288dbf56da7213b1ca656f19bd216a9ba90929.tar.gz
avfilter/avf_showspectrum: set hop_size for showspectrumpic
Fixes invalid spikes in video output.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/avf_showspectrum.c1
1 files changed, 1 insertions, 0 deletions
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;