don't sync in first second
This commit is contained in:
parent
ecbd30c460
commit
e4793e816c
1 changed files with 4 additions and 2 deletions
|
@ -180,8 +180,10 @@ class Sync(Thread):
|
||||||
frames = deviation / 0.04
|
frames = deviation / 0.04
|
||||||
median_frames = median_deviation / 0.04
|
median_frames = median_deviation / 0.04
|
||||||
if time.time() - self.last_sync > SYNC_GRACE_TIME and abs(median_deviation) > SYNC_TOLERANCE:
|
if time.time() - self.last_sync > SYNC_GRACE_TIME and abs(median_deviation) > SYNC_TOLERANCE:
|
||||||
if not self.need_to_sync:
|
if self.mpv.time_pos > 2 and not self.need_to_sync:
|
||||||
logger.error('need to sync %0.05f (%d) median %0.05f (%d)' % (deviation, frames, median_deviation, median_frames))
|
logger.error(
|
||||||
|
'%0.05f need to sync %0.05f (%d) median %0.05f (%d)' % (self.mpv.time_pos, deviation, frames, median_deviation, median_frames)
|
||||||
|
)
|
||||||
self.need_to_sync = True
|
self.need_to_sync = True
|
||||||
|
|
||||||
def median(self, lst):
|
def median(self, lst):
|
||||||
|
|
Loading…
Reference in a new issue