From 75217166635269fa4095c09dd68a37ed02dc00fa Mon Sep 17 00:00:00 2001 From: "shihong.zheng" Date: Tue, 26 Mar 2019 18:40:27 +0800 Subject: [PATCH] pts: fix mvc play is not smooth. [1/1] PD#SWPL-6094 Problem: some mvc stream is not smooth. Solution: optimize the condition for pts loockup fail code. Verify: x301 Change-Id: I50bb3f317e1245735f9ce0ffcc44376c91e871ed Signed-off-by: shihong.zheng --- drivers/amlogic/media/frame_sync/ptsserv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/amlogic/media/frame_sync/ptsserv.c b/drivers/amlogic/media/frame_sync/ptsserv.c index 82e1213..0930068 100644 --- a/drivers/amlogic/media/frame_sync/ptsserv.c +++ b/drivers/amlogic/media/frame_sync/ptsserv.c @@ -752,10 +752,11 @@ static int pts_lookup_offset_inline_locked(u8 type, u32 offset, u32 *val, p2 = p; } + /* if p2 lookup fail, set p2 = p */ if (type == PTS_TYPE_VIDEO && p2 && p && OFFSET_DIFF(offset, p2->offset) > lookup_threshold && - OFFSET_DIFF(offset, p->offset) < lookup_threshold) + abs(OFFSET_DIFF(offset, p->offset)) < lookup_threshold) p2 = p; } else if (OFFSET_LATER(p->offset, offset)) { list_for_each_entry_continue_reverse(p, -- 2.7.4