mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-19 05:40:56 +00:00
avfilter/vf_fftdnoiz: Check return value of av_tx_init()
Should fix Coverity issue #1500329. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
c787eab395
commit
bfab87a61d
@ -208,13 +208,17 @@ static int config_input(AVFilterLink *inlink)
|
|||||||
|
|
||||||
for (int i = 0; i < s->nb_threads; i++) {
|
for (int i = 0; i < s->nb_threads; i++) {
|
||||||
float scale = 1.f, iscale = 1.f;
|
float scale = 1.f, iscale = 1.f;
|
||||||
|
int ret;
|
||||||
|
|
||||||
av_tx_init(&s->fft[i], &s->tx_fn, AV_TX_FLOAT_FFT, 0, s->block_size, &scale, 0);
|
if ((ret = av_tx_init(&s->fft[i], &s->tx_fn, AV_TX_FLOAT_FFT,
|
||||||
av_tx_init(&s->ifft[i], &s->itx_fn, AV_TX_FLOAT_FFT, 1, s->block_size, &iscale, 0);
|
0, s->block_size, &scale, 0)) < 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);
|
(ret = av_tx_init(&s->ifft[i], &s->itx_fn, AV_TX_FLOAT_FFT,
|
||||||
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);
|
1, s->block_size, &iscale, 0)) < 0 ||
|
||||||
if (!s->fft[i] || !s->ifft[i] || !s->fft_r[i] || !s->ifft_r[i])
|
(ret = av_tx_init(&s->fft_r[i], &s->tx_r_fn, AV_TX_FLOAT_FFT,
|
||||||
return AVERROR(ENOMEM);
|
0, 1 + s->nb_prev + s->nb_next, &scale, 0)) < 0 ||
|
||||||
|
(ret = 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 ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < s->nb_planes; i++) {
|
for (i = 0; i < s->nb_planes; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user