This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/7.1 in repository ffmpeg.
commit 6b8b34bb42d65dd14c00e1619ba5b8f9bea79b6e Author: Andreas Rheinhardt <[email protected]> AuthorDate: Mon Feb 23 22:59:45 2026 +0100 Commit: Michael Niedermayer <[email protected]> CommitDate: Thu Jun 18 20:31:07 2026 +0200 avfilter/avf_showspectrum: Fix allocation check If s->stop is set, the return value would be overwritten before being checked. This bug was introduced in the switch to AV_TX in 014ace8f98cc4a1a88e7a6d5890cef628eb9e8b0. Signed-off-by: Andreas Rheinhardt <[email protected]> (cherry picked from commit 0992c19c3046973047b658c0e105dede404fb0c5) Signed-off-by: Michael Niedermayer <[email protected]> --- libavfilter/avf_showspectrum.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c index 565f23c28b..4b2961305c 100644 --- a/libavfilter/avf_showspectrum.c +++ b/libavfilter/avf_showspectrum.c @@ -1152,6 +1152,11 @@ static int config_output(AVFilterLink *outlink) 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 (ret < 0) { + av_log(ctx, AV_LOG_ERROR, "Unable to create FFT context. " + "The window size might be too high.\n"); + return ret; + } if (s->stop) { ret = av_tx_init(&s->ifft[i], &s->itx_fn, AV_TX_FLOAT_FFT, 1, fft_size << (!!s->stop), &scale, 0); if (ret < 0) { @@ -1160,11 +1165,6 @@ static int config_output(AVFilterLink *outlink) return ret; } } - if (ret < 0) { - av_log(ctx, AV_LOG_ERROR, "Unable to create FFT context. " - "The window size might be too high.\n"); - return ret; - } } s->magnitudes = av_calloc(s->nb_display_channels, sizeof(*s->magnitudes)); _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
