PD#SWPL-5131
Problem:
Some stream in tunnel mode, first audio pts is large than
AV_DISCONTINUE_THREDHOLD_MAX(60s). In audio_hw it will check pcr and
apts diff, so large difference between pcr and apts will lead sync mode
from amster to vmaster(egg:SYNC-HEVC-59FPS-DDP51)
Solution:
do not operate tsync_mode_switch before first video toggled
Verify:
verify by franklin
Change-Id: Icec2de71ea8f838146444aa3ea880f76ed8e0f13
Signed-off-by: Yingwei Long <yingwei.long@amlogic.com>
t = timestamp_vpts_get();
else
t = timestamp_pcrscr_get();
+ /* do not switch tsync mode until first video toggled. */
if ((abs(oldpts - pts) > tsync_av_threshold_min) &&
- (!get_vsync_pts_inc_mode())) { /* is discontinue */
+ (timestamp_firstvpts_get() > 0)) { /* is discontinue */
apts_discontinue = 1;
tsync_mode_switch('A', abs(pts - t),
pts - oldpts); /*if in VMASTER ,just wait */