This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 0992c19c3046973047b658c0e105dede404fb0c5 Author: Andreas Rheinhardt <[email protected]> AuthorDate: Mon Feb 23 22:59:45 2026 +0100 Commit: Andreas Rheinhardt <[email protected]> CommitDate: Tue Mar 10 13:52:17 2026 +0100 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]> --- 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 67bbc77150..2d87660fa4 100644 --- a/libavfilter/avf_showspectrum.c +++ b/libavfilter/avf_showspectrum.c @@ -1143,6 +1143,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) { @@ -1151,11 +1156,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]
