mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 12:09:55 +00:00
avcodec/mdct_template: Use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
681a5b8d6f
commit
92cc6d5163
@ -60,7 +60,7 @@ av_cold int ff_mdct_init(FFTContext *s, int nbits, int inverse, double scale)
|
|||||||
if (ff_fft_init(s, s->mdct_bits - 2, inverse) < 0)
|
if (ff_fft_init(s, s->mdct_bits - 2, inverse) < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
s->tcos = av_malloc(n/2 * sizeof(FFTSample));
|
s->tcos = av_malloc_array(n/2, sizeof(FFTSample));
|
||||||
if (!s->tcos)
|
if (!s->tcos)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user