diff options
author | Alex Converse <alex.converse@gmail.com> | 2012-01-25 14:34:21 -0800 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-26 17:16:33 +0100 |
commit | 5af569aa30b93f56344ea540936eb671760f568c (patch) | |
tree | 6f093fe754d8e4d46957e04768610fd82d12a0a6 /libavformat/matroskadec.c | |
parent | 92115bb685914cbfeb02fed26d5acd50dea03d7e (diff) | |
download | ffmpeg-5af569aa30b93f56344ea540936eb671760f568c.tar.gz |
matroskadec: Pad AAC extradata.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit d2ee8c17793201ce969afd1f433ba1580c143cd2)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r-- | libavformat/matroskadec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 600b1f4c60..80ff938042 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1488,7 +1488,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); |