ptsserv: fix pts lookup fail issue [3/3]

PD#SWPL-3730

Problem:
playback not smooth

Solution:
if p2 lookup fail, set p2 = p

Verify:
  verified by x301

Change-Id: I181eae2ba40edd937df12e0925c2a55c856162ba
Signed-off-by: rongrong zhou <rongrong.zhou@amlogic.com>
This commit is contained in:
rongrong zhou
2019-03-06 17:59:28 +08:00
committed by Luan Yuan
parent 5c18ac7c4d
commit a71fda4316

View File

@@ -752,6 +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)
p2 = p;
} else if (OFFSET_LATER(p->offset, offset)) {
list_for_each_entry_continue_reverse(p,
&pTable->