From 1031e073dae13ce4f9a56188b5b326dcc5ad5730 Mon Sep 17 00:00:00 2001 From: jai_menon Date: Wed, 3 Sep 2008 13:31:33 +0000 Subject: [PATCH] fix issue 616 on roundup : decoding of short flac files git-svn-id: file:///var/local/repositories/ffmpeg/trunk@15177 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b --- libavcodec/flac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/flac.c b/libavcodec/flac.c index 60b35a393..4028507e0 100644 --- a/libavcodec/flac.c +++ b/libavcodec/flac.c @@ -614,7 +614,7 @@ static int flac_decode_frame(AVCodecContext *avctx, *data_size=0; if(s->max_framesize == 0){ - s->max_framesize= 65536; // should hopefully be enough for the first header + s->max_framesize= FFMAX(4, buf_size); // should hopefully be enough for the first header s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize); } -- 2.39.2