mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avcodec/dct: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
e2c7816ab0
commit
5e95551199
@ -190,7 +190,7 @@ av_cold int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType inverse)
|
||||
ff_init_ff_cos_tabs(nbits + 2);
|
||||
|
||||
s->costab = ff_cos_tabs[nbits + 2];
|
||||
s->csc2 = av_malloc(n / 2 * sizeof(FFTSample));
|
||||
s->csc2 = av_malloc_array(n / 2, sizeof(FFTSample));
|
||||
|
||||
if (ff_rdft_init(&s->rdft, nbits, inverse == DCT_III) < 0) {
|
||||
av_free(s->csc2);
|
||||
|
Loading…
Reference in New Issue
Block a user