# HG changeset patch # User alexc # Date 1277760897 0 # Node ID ea2cb1a9e815c6808c15ae97a477ecac8aff9847 # Parent c15e87b9767b51023a5b1bcf5b6067c9f634f0d3 aacenc: Properly pad extradata. This fixes a valgrind error when encoding to ADTS. diff -r c15e87b9767b -r ea2cb1a9e815 aacenc.c --- a/aacenc.c Mon Jun 28 21:12:00 2010 +0000 +++ b/aacenc.c Mon Jun 28 21:34:57 2010 +0000 @@ -191,7 +191,7 @@ 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);