mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avcodec/wmv2enc: allocate padding for extradata and check malloc failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
5441eb460c
commit
6e8fe44815
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user