From 7e13df0813e4364d67aae48d91b1a276592e8d32 Mon Sep 17 00:00:00 2001 From: Johnson Ding Date: Wed, 10 Jul 2019 10:22:49 +0800 Subject: [PATCH] [jpegd]: Fix paser error After pasering SOF makers and DQT, DHT etc, buffer pointer should point to the position after what has been read. Otherwise, paser will be finding markers right after the last marker. And may lead to take datas in DHT or DQT as markers. Refer to this issue: https://redmine.rockchip.com.cn/issues/212649 Change-Id: Ie4edc8ab43aeedf1678894a9968a1254ca10ac50 Signed-off-by: Johnson Ding --- mpp/codec/dec/jpeg/jpegd_parser.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mpp/codec/dec/jpeg/jpegd_parser.c b/mpp/codec/dec/jpeg/jpegd_parser.c index 9d99d8d0..7ea3a521 100644 --- a/mpp/codec/dec/jpeg/jpegd_parser.c +++ b/mpp/codec/dec/jpeg/jpegd_parser.c @@ -907,6 +907,8 @@ static MPP_RET jpegd_decode_frame(JpegdCtx *ctx) start_code); break; } + + buf_ptr = ctx->bit_ctx->data_; } if (!syntax->eoi_found) {