You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-09-16 08:36:51 +02:00
dct: Check memory allocation
This commit is contained in:
committed by
Luca Barbato
parent
e524f37356
commit
69277069dd
@@ -191,6 +191,8 @@ av_cold int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType inverse)
|
||||
|
||||
s->costab = ff_cos_tabs[nbits + 2];
|
||||
s->csc2 = av_malloc(n / 2 * sizeof(FFTSample));
|
||||
if (!s->csc2)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
if (ff_rdft_init(&s->rdft, nbits, inverse == DCT_III) < 0) {
|
||||
av_free(s->csc2);
|
||||
|
Reference in New Issue
Block a user