mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 11:49:48 +00:00
matroskadec: Pad AAC extradata.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
This commit is contained in:
parent
8801fac365
commit
d2ee8c1779
@ -1440,7 +1440,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
||||
} else if (codec_id == CODEC_ID_AAC && !track->codec_priv.size) {
|
||||
int profile = matroska_aac_profile(track->codec_id);
|
||||
int sri = matroska_aac_sri(track->audio.samplerate);
|
||||
extradata = av_malloc(5);
|
||||
extradata = av_mallocz(5 + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
if (extradata == NULL)
|
||||
return AVERROR(ENOMEM);
|
||||
extradata[0] = (profile << 3) | ((sri&0x0E) >> 1);
|
||||
|
Loading…
Reference in New Issue
Block a user