From 70a8c796807e564b5248cbeebc1162f86f2e6137 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sat, 28 Jan 2012 20:25:59 +0000 Subject: [PATCH] v210dec: check return value of avcodec_alloc_frame() Signed-off-by: Paul B Mahol Signed-off-by: Michael Niedermayer --- libavcodec/v210dec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c index 1af7f943e1..1703ceebdd 100644 --- a/libavcodec/v210dec.c +++ b/libavcodec/v210dec.c @@ -58,6 +58,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); s->unpack_frame = v210_planar_unpack_c;