summaryrefslogtreecommitdiff
path: root/libavcodec/aacenc.c
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2010-06-28 21:34:57 +0000
committerAlex Converse <alex.converse@gmail.com>2010-06-28 21:34:57 +0000
commit072c0d605fd4815441dc2f8f4c5f3b4efc81c878 (patch)
tree75f584884ba8a062520791248dd72e5d96896945 /libavcodec/aacenc.c
parent50f70541d36b3ff477b63b3ec754e28ace824d8e (diff)
aacenc: Properly pad extradata.
This fixes a valgrind error when encoding to ADTS. Originally committed as revision 23866 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aacenc.c')
-rw-r--r--libavcodec/aacenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 8c913e0dbc..6d66c66862 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -191,7 +191,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
s->samples = av_malloc(2 * 1024 * avctx->channels * sizeof(s->samples[0]));
s->cpe = av_mallocz(sizeof(ChannelElement) * aac_chan_configs[avctx->channels-1][0]);
- avctx->extradata = av_malloc(2);
+ avctx->extradata = av_mallocz(2 + FF_INPUT_BUFFER_PADDING_SIZE);
avctx->extradata_size = 2;
put_audio_specific_config(avctx);