Browse code

avcodec/shorten: make max frame size bigger if custom block size was used

Signed-off-by: Paul B Mahol <onemda@gmail.com>

Paul B Mahol authored on 2016/04/27 16:08:45
Showing 1 changed files
... ...
@@ -558,7 +558,7 @@ static int shorten_decode_frame(AVCodecContext *avctx, void *data,
558 558
             int max_framesize;
559 559
             void *tmp_ptr;
560 560
 
561
-            max_framesize = FFMAX(s->max_framesize, s->blocksize * s->channels * 2);
561
+            max_framesize = FFMAX(s->max_framesize, s->blocksize * s->channels * 8);
562 562
             tmp_ptr = av_fast_realloc(s->bitstream, &s->allocated_bitstream_size,
563 563
                                       max_framesize + AV_INPUT_BUFFER_PADDING_SIZE);
564 564
             if (!tmp_ptr) {