[FFmpeg-cvslog] r23866 - trunk/libavcodec/aacenc.c

alexc subversion
Mon Jun 28 23:34:57 CEST 2010


Author: alexc
Date: Mon Jun 28 23:34:57 2010
New Revision: 23866

Log:
aacenc: Properly pad extradata.

This fixes a valgrind error when encoding to ADTS.

Modified:
   trunk/libavcodec/aacenc.c

Modified: trunk/libavcodec/aacenc.c
==============================================================================
--- trunk/libavcodec/aacenc.c	Mon Jun 28 23:12:00 2010	(r23865)
+++ trunk/libavcodec/aacenc.c	Mon Jun 28 23:34:57 2010	(r23866)
@@ -191,7 +191,7 @@ static av_cold int aac_encode_init(AVCod
 
     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);
 



More information about the ffmpeg-cvslog mailing list