mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
wmv2enc: Check memory allocation
This commit is contained in:
parent
a67b67944a
commit
03eb557414
@ -63,6 +63,9 @@ static av_cold int wmv2_encode_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
avctx->extradata_size = 4;
|
avctx->extradata_size = 4;
|
||||||
avctx->extradata = av_mallocz(avctx->extradata_size + 10);
|
avctx->extradata = av_mallocz(avctx->extradata_size + 10);
|
||||||
|
if (!avctx->extradata)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
encode_ext_header(w);
|
encode_ext_header(w);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user