summaryrefslogtreecommitdiff
path: root/libavcodec/frwu.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-01-27 01:13:48 +0000
committerRonald S. Bultje <rsbultje@gmail.com>2012-01-27 09:31:06 +0800
commit5eda82aac9b400f0435293db9b102bd4e9749a7b (patch)
tree5b385d8e56a60865f2ec91f756ec28e4a9cf728c /libavcodec/frwu.c
parentd51d6ae9c41310d62f4582c07c2fad26d41eeca6 (diff)
downloadffmpeg-5eda82aac9b400f0435293db9b102bd4e9749a7b.tar.gz
frwu: check if allocation was successful
Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavcodec/frwu.c')
-rw-r--r--libavcodec/frwu.c2
1 files changed, 2 insertions, 0 deletions
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;
}