From 1e90450fad76427d781f0ee44d8ee41037a395d1 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sat, 28 Jan 2012 20:09:05 +0000 Subject: r210dec: check return value of avcodec_alloc_frame() Signed-off-by: Paul B Mahol Signed-off-by: Michael Niedermayer --- libavcodec/r210dec.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavcodec/r210dec.c') diff --git a/libavcodec/r210dec.c b/libavcodec/r210dec.c index d31033229f..d8cad3535c 100644 --- a/libavcodec/r210dec.c +++ b/libavcodec/r210dec.c @@ -29,6 +29,8 @@ static av_cold int decode_init(AVCodecContext *avctx) avctx->bits_per_raw_sample = 10; avctx->coded_frame = avcodec_alloc_frame(); + if (!avctx->coded_frame) + return AVERROR(ENOMEM); return 0; } -- cgit v1.2.3