From: Paul B Mahol Date: Mon, 18 Apr 2016 21:27:08 +0000 (+0200) Subject: avcodec/tak_parser: fix parsing of streams with bunch of small frames at end X-Git-Tag: android-x86-7.1-r1~5539 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=13406b6124a5120ad029476119b3cdc010fdf0b7;p=android-x86%2Fexternal-ffmpeg.git avcodec/tak_parser: fix parsing of streams with bunch of small frames at end Signed-off-by: Paul B Mahol --- 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;