diff options
author | Alex Converse <alex.converse@gmail.com> | 2012-01-26 02:34:21 +0400 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2012-04-01 20:33:26 +0400 |
commit | dd7b323d9a2f6ddc0e277403fdbd06226306f4a1 (patch) | |
tree | c10f937ffeeecfbf6e0333a7f41f04e417ec1f91 /libavformat/matroskadec.c | |
parent | bf9f26cef73eea9d9c2e73b89a5fe88e5aedc737 (diff) |
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: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
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 fad554f09f..5c814f483f 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1384,7 +1384,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); |