From 5eda82aac9b400f0435293db9b102bd4e9749a7b Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Fri, 27 Jan 2012 01:13:48 +0000 Subject: [PATCH] frwu: check if allocation was successful Signed-off-by: Paul B Mahol Signed-off-by: Ronald S. Bultje --- libavcodec/frwu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/frwu.c b/libavcodec/frwu.c index 061c460040..eba0530e3c 100644 --- a/libavcodec/frwu.c +++ b/libavcodec/frwu.c @@ -33,6 +33,8 @@ static av_cold int decode_init(AVCodecContext *avctx) avctx->pix_fmt = PIX_FMT_UYVY422; avctx->coded_frame = avcodec_alloc_frame(); + if (!avctx->coded_frame) + return AVERROR(ENOMEM); return 0; }