summaryrefslogtreecommitdiff
path: root/libavcodec/wmv2enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/wmv2enc.c')
-rw-r--r--libavcodec/wmv2enc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/wmv2enc.c b/libavcodec/wmv2enc.c
index 6aeee59ab2..869b3c7fe4 100644
--- a/libavcodec/wmv2enc.c
+++ b/libavcodec/wmv2enc.c
@@ -60,7 +60,9 @@ static av_cold int wmv2_encode_init(AVCodecContext *avctx){
ff_wmv2_common_init(w);
avctx->extradata_size= 4;
- avctx->extradata= av_mallocz(avctx->extradata_size + 10);
+ avctx->extradata= av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
+ if (!avctx->extradata)
+ return AVERROR(ENOMEM);
encode_ext_header(w);
return 0;