]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/shorten.c
Merge commit 'e08c946c6860a78b0c479551d5f6735361160cbd'
[ffmpeg] / libavcodec / shorten.c
index 1d3b6eb1bbc2849e0c8a9e7a71ae01858512e48e..23c5d7cf9b58dbe30996e87e7091627a13131dff 100644 (file)
@@ -424,7 +424,7 @@ static int shorten_decode_frame(AVCodecContext *avctx, void *data,
         void *tmp_ptr;
         s->max_framesize = 8192; // should hopefully be enough for the first header
         tmp_ptr = av_fast_realloc(s->bitstream, &s->allocated_bitstream_size,
-                                  s->max_framesize);
+                                  s->max_framesize + FF_INPUT_BUFFER_PADDING_SIZE);
         if (!tmp_ptr) {
             av_log(avctx, AV_LOG_ERROR, "error allocating bitstream buffer\n");
             return AVERROR(ENOMEM);