diff options
-rw-r--r-- | libavcodec/wmv2enc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/wmv2enc.c b/libavcodec/wmv2enc.c index e4e51d32f9..e4d4159e37 100644 --- a/libavcodec/wmv2enc.c +++ b/libavcodec/wmv2enc.c @@ -63,6 +63,9 @@ static av_cold int wmv2_encode_init(AVCodecContext *avctx) avctx->extradata_size = 4; avctx->extradata = av_mallocz(avctx->extradata_size + 10); + if (!avctx->extradata) + return AVERROR(ENOMEM); + encode_ext_header(w); return 0; |