summaryrefslogtreecommitdiff
path: root/libavcodec/huffyuvenc.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2015-05-31 14:54:03 +0200
committerLuca Barbato <lu_zero@gentoo.org>2015-05-31 15:03:31 +0200
commit7d2a6826912b629f17f3b0c5268e334fa123c4c9 (patch)
treef17f184881bb22933e567522049e84644b5a04e3 /libavcodec/huffyuvenc.c
parent7fccc96dc3c0bb2fa2079cbf4e4cf1aff2db46c8 (diff)
huffyuv: Check memory allocation
Diffstat (limited to 'libavcodec/huffyuvenc.c')
-rw-r--r--libavcodec/huffyuvenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/huffyuvenc.c b/libavcodec/huffyuvenc.c
index 6b3ff76505..175b2567f4 100644
--- a/libavcodec/huffyuvenc.c
+++ b/libavcodec/huffyuvenc.c
@@ -155,7 +155,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
s->version = 2;
avctx->coded_frame = av_frame_alloc();
- if (!avctx->coded_frame)
+ if (!avctx->extradata || !avctx->stats_out || !avctx->coded_frame)
return AVERROR(ENOMEM);
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;