avcodec/shorten: make max frame size bigger if custom block size was used
authorPaul B Mahol <onemda@gmail.com>
Wed, 27 Apr 2016 07:08:45 +0000 (09:08 +0200)
committerPaul B Mahol <onemda@gmail.com>
Wed, 27 Apr 2016 07:08:45 +0000 (09:08 +0200)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/shorten.c

index 061a74b..e4cef61 100644 (file)
@@ -558,7 +558,7 @@ static int shorten_decode_frame(AVCodecContext *avctx, void *data,
             int max_framesize;
             void *tmp_ptr;
 
-            max_framesize = FFMAX(s->max_framesize, s->blocksize * s->channels * 2);
+            max_framesize = FFMAX(s->max_framesize, s->blocksize * s->channels * 8);
             tmp_ptr = av_fast_realloc(s->bitstream, &s->allocated_bitstream_size,
                                       max_framesize + AV_INPUT_BUFFER_PADDING_SIZE);
             if (!tmp_ptr) {