Should fix Coverity issue #1500329. Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> --- libavfilter/vf_fftdnoiz.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/libavfilter/vf_fftdnoiz.c b/libavfilter/vf_fftdnoiz.c index e74f40b4cb..f7200699c6 100644 --- a/libavfilter/vf_fftdnoiz.c +++ b/libavfilter/vf_fftdnoiz.c @@ -208,13 +208,17 @@ static int config_input(AVFilterLink *inlink) for (int i = 0; i < s->nb_threads; i++) { float scale = 1.f, iscale = 1.f; - - av_tx_init(&s->fft[i], &s->tx_fn, AV_TX_FLOAT_FFT, 0, s->block_size, &scale, 0); - av_tx_init(&s->ifft[i], &s->itx_fn, AV_TX_FLOAT_FFT, 1, s->block_size, &iscale, 0); - av_tx_init(&s->fft_r[i], &s->tx_r_fn, AV_TX_FLOAT_FFT, 0, 1 + s->nb_prev + s->nb_next, &scale, 0); - av_tx_init(&s->ifft_r[i], &s->itx_r_fn, AV_TX_FLOAT_FFT, 1, 1 + s->nb_prev + s->nb_next, &iscale, 0); - if (!s->fft[i] || !s->ifft[i] || !s->fft_r[i] || !s->ifft_r[i]) - return AVERROR(ENOMEM); + int err; + + if ((err = av_tx_init(&s->fft[i], &s->tx_fn, AV_TX_FLOAT_FFT, + 0, s->block_size, &scale, 0)) < 0 || + (err = av_tx_init(&s->ifft[i], &s->itx_fn, AV_TX_FLOAT_FFT, + 1, s->block_size, &iscale, 0)) < 0 || + (err = av_tx_init(&s->fft_r[i], &s->tx_r_fn, AV_TX_FLOAT_FFT, + 0, 1 + s->nb_prev + s->nb_next, &scale, 0)) < 0 || + (err = av_tx_init(&s->ifft_r[i], &s->itx_r_fn, AV_TX_FLOAT_FFT, + 1, 1 + s->nb_prev + s->nb_next, &iscale, 0)) < 0) + return err; } for (i = 0; i < s->nb_planes; i++) { -- 2.34.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".