lcl: Check memory allocation

This commit is contained in:
Vittorio Giovara 2015-05-31 14:54:21 +02:00 committed by Luca Barbato
parent 7ca603f96f
commit 8df5fbf0b0

View File

@ -135,6 +135,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
assert(avctx->width && avctx->height); assert(avctx->width && avctx->height);
avctx->extradata= av_mallocz(8); avctx->extradata= av_mallocz(8);
if (!avctx->extradata)
return AVERROR(ENOMEM);
avctx->coded_frame = av_frame_alloc(); avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame) if (!avctx->coded_frame)