diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-06-01 01:41:02 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-01 01:41:21 +0200 |
commit | 7110b024a90097312794b55d1145724e10589c59 (patch) | |
tree | e84346bdd12f0507f24aab853e60eeef2c24011e | |
parent | e7a65142b972fc1f7fd020d89c8f82dc3cfbc553 (diff) | |
parent | e524f37356156893cae50fc46451bd4a6198703d (diff) | |
download | ffmpeg-7110b024a90097312794b55d1145724e10589c59.tar.gz |
Merge commit 'e524f37356156893cae50fc46451bd4a6198703d'
* commit 'e524f37356156893cae50fc46451bd4a6198703d':
asv: Check memory allocation
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/asvenc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/asvenc.c b/libavcodec/asvenc.c index e6f5a1a252..d78fa47ed4 100644 --- a/libavcodec/asvenc.c +++ b/libavcodec/asvenc.c @@ -333,6 +333,8 @@ static av_cold int encode_init(AVCodecContext *avctx) avctx->global_quality / 2) / avctx->global_quality; avctx->extradata = av_mallocz(8); + if (!avctx->extradata) + return AVERROR(ENOMEM); avctx->extradata_size = 8; ((uint32_t *) avctx->extradata)[0] = av_le2ne32(a->inv_qscale); ((uint32_t *) avctx->extradata)[1] = av_le2ne32(AV_RL32("ASUS")); |