]> git.sesse.net Git - ffmpeg/commitdiff
avcodec_encode_audio2: add missing padding to realloc()
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 22 Mar 2012 01:17:32 +0000 (02:17 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 22 Mar 2012 18:03:17 +0000 (19:03 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/utils.c

index e61ace6e752f8334f24305346d53e6b16856160e..b5570aac6e89c8ff2ca88372948379a529ca787a 100644 (file)
@@ -1071,7 +1071,7 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx,
     }
     if (!ret) {
         if (!user_packet && avpkt->data) {
-            uint8_t *new_data = av_realloc(avpkt->data, avpkt->size);
+            uint8_t *new_data = av_realloc(avpkt->data, avpkt->size + FF_INPUT_BUFFER_PADDING_SIZE);
             if (new_data)
                 avpkt->data = new_data;
         }