lcl: Check memory allocation
This commit is contained in:
parent
7ca603f96f
commit
8df5fbf0b0
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user