diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-08-17 01:38:32 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-08-17 01:43:30 +0200 |
commit | eeb3fb9e62d4647e1fee5d262be63e793117430d (patch) | |
tree | 67ba1792daa82363f741a62cd3b40e552767bd45 /libavcodec | |
parent | faf7c356554d54be0ddb5f989791407e23753549 (diff) | |
download | ffmpeg-eeb3fb9e62d4647e1fee5d262be63e793117430d.tar.gz |
ffv1enc: check for malloc failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/ffv1enc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index 23fb23b30c..bb7e087198 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -529,6 +529,8 @@ static int write_extradata(FFV1Context *f) f->avctx->extradata_size = 10000 + 4 + (11 * 11 * 5 * 5 * 5 + 11 * 11 * 11) * 32; f->avctx->extradata = av_malloc(f->avctx->extradata_size); + if (!f->avctx->extradata) + return AVERROR(ENOMEM); ff_init_range_encoder(c, f->avctx->extradata, f->avctx->extradata_size); ff_build_rac_states(c, 0.05 * (1LL << 32), 256 - 8); |