From 13406b6124a5120ad029476119b3cdc010fdf0b7 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Mon, 18 Apr 2016 23:27:08 +0200 Subject: [PATCH] avcodec/tak_parser: fix parsing of streams with bunch of small frames at end Signed-off-by: Paul B Mahol --- libavcodec/tak_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/tak_parser.c b/libavcodec/tak_parser.c index 4f2149ae11..1417fb4526 100644 --- a/libavcodec/tak_parser.c +++ b/libavcodec/tak_parser.c @@ -59,7 +59,7 @@ static int tak_parse(AVCodecParserContext *s, AVCodecContext *avctx, while (buf_size || t->index + needed <= pc->index) { if (buf_size && t->index + TAK_MAX_FRAME_HEADER_BYTES > pc->index) { - int tmp_buf_size = FFMIN(2 * TAK_MAX_FRAME_HEADER_BYTES, + int tmp_buf_size = FFMIN(TAK_MAX_FRAME_HEADER_BYTES, buf_size); const uint8_t *tmp_buf = buf;