mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 11:19:55 +00:00
avcodec/aac_adtstoasc_bsf: Clear extradata_size on allocation failure
This keeps the fields consistent Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
38e867f6c0
commit
2e786bc498
@ -90,8 +90,10 @@ static int aac_adtstoasc_filter(AVBitStreamFilterContext *bsfc,
|
||||
av_free(avctx->extradata);
|
||||
avctx->extradata_size = 2 + pce_size;
|
||||
avctx->extradata = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
if (!avctx->extradata)
|
||||
if (!avctx->extradata) {
|
||||
avctx->extradata_size = 0;
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
init_put_bits(&pb, avctx->extradata, avctx->extradata_size);
|
||||
put_bits(&pb, 5, hdr.object_type);
|
||||
|
Loading…
Reference in New Issue
Block a user