[FFmpeg-cvslog] avfilter/avf_showspectrum: fix stride and set scale
Paul B Mahol
git at videolan.org
Fri Nov 18 13:54:57 EET 2022
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Nov 18 12:50:55 2022 +0100| [193270ee87d8e5a4b193d36ae50d29a4f0038c6d] | committer: Paul B Mahol
avfilter/avf_showspectrum: fix stride and set scale
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=193270ee87d8e5a4b193d36ae50d29a4f0038c6d
---
libavfilter/avf_showspectrum.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
index 8e9597cdf6..da7c186326 100644
--- a/libavfilter/avf_showspectrum.c
+++ b/libavfilter/avf_showspectrum.c
@@ -470,7 +470,7 @@ static int run_channel_fft(AVFilterContext *ctx, void *arg, int jobnr, int nb_jo
}
memcpy(f, g, s->buf_size * sizeof(*f));
- s->itx_fn(s->ifft[ch], g, f, sizeof(float));
+ s->itx_fn(s->ifft[ch], g, f, sizeof(AVComplexFloat));
for (int k = 0; k < M; k++) {
psi = k * k / 2.f * phi;
@@ -1146,7 +1146,7 @@ static int config_output(AVFilterLink *outlink)
s->nb_display_channels = inlink->ch_layout.nb_channels;
for (i = 0; i < s->nb_display_channels; i++) {
- float scale;
+ float scale = 1.f;
ret = av_tx_init(&s->fft[i], &s->tx_fn, AV_TX_FLOAT_FFT, 0, fft_size << (!!s->stop), &scale, 0);
if (s->stop) {
More information about the ffmpeg-cvslog
mailing list