fix re-sync when mplayer is idle
Stefan Schuermans

Stefan Schuermans commited on 2018-08-15 12:41:18
Showing 1 changed files, with 1 additions and 6 deletions.

... ...
@@ -419,12 +419,6 @@ class Synchronizer:
419 419
        self.mplayer_pos is None or \
420 420
        self.mplayer_timestamp is None:
421 421
       return
422
-    # do nothing if MPlayer information is too old
423
-    # (ignore MPlayer info age in MPlayer pause mode, as there is no info)
424
-    if not self.mplayer_pause:
425
-      mplayer_age = (now - self.mplayer_timestamp).total_seconds()
426
-      if mplayer_age > self.info_timeout:
427
-        return
428 422
     # do nothing if last MPlayer command has been sent shortly
429 423
     if self.mplayer_last_cmd_timestamp is not None:
430 424
       last_cmd_age = (now - self.mplayer_last_cmd_timestamp).total_seconds()
... ...
@@ -451,6 +445,7 @@ class Synchronizer:
451 445
     # calculate offset (account for time elased since last info)
452 446
     mplayer_pos = self.mplayer_pos
453 447
     if not self.mplayer_pause:
448
+      mplayer_age = (now - self.mplayer_timestamp).total_seconds()
454 449
       mplayer_pos += mplayer_age
455 450
     posy_pos = self.posy_pos
456 451
     if not self.posy_pause:
457 452