aboutsummaryrefslogtreecommitdiff
path: root/libavcodec/dct.c
diff options
context:
space:
mode:
authorMichael Niedermayer2015-06-01 01:42:13 +0200
committerMichael Niedermayer2015-06-01 01:42:13 +0200
commit3a8b16f78e8bf35328f9d70506c1205bb258792c (patch)
tree4159323a6ea800330e44d62a15b48cf9f62471ea /libavcodec/dct.c
parent7110b024a90097312794b55d1145724e10589c59 (diff)
parent69277069dd225f5ae02f0215e877a06522d834d3 (diff)
Merge commit '69277069dd225f5ae02f0215e877a06522d834d3'
* commit '69277069dd225f5ae02f0215e877a06522d834d3': dct: Check memory allocation Conflicts: libavcodec/dct.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dct.c')
-rw-r--r--libavcodec/dct.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/dct.c b/libavcodec/dct.c
index 9cabc4f591..cca51eeaf8 100644
--- a/libavcodec/dct.c
+++ b/libavcodec/dct.c
@@ -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_array(n / 2, sizeof(FFTSample));
+ if (!s->csc2)
+ return AVERROR(ENOMEM);
if (ff_rdft_init(&s->rdft, nbits, inverse == DCT_III) < 0) {
av_freep(&s->csc2);