From d73466f841b1732e4e817bf51f2153c4bab00428 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 5 Feb 2012 21:14:34 +0000 Subject: v210enc: check for coded_frame allocation failure Signed-off-by: Paul B Mahol Signed-off-by: Anton Khirnov --- libavcodec/v210enc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c index 58613520a5..069f915158 100644 --- a/libavcodec/v210enc.c +++ b/libavcodec/v210enc.c @@ -41,6 +41,8 @@ static av_cold int encode_init(AVCodecContext *avctx) avctx->bits_per_raw_sample); avctx->coded_frame = avcodec_alloc_frame(); + if (!avctx->coded_frame) + return AVERROR(ENOMEM); avctx->coded_frame->key_frame = 1; avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; -- cgit v1.2.3