mirror of
https://github.com/Syncplay/syncplay
synced 2025-03-05 11:17:32 +00:00
Ignore erroneous VLC duplicate position responses caused by low VLC time accuracy on AVI and some MKV files
This commit is contained in:
parent
d0e93ca026
commit
63847c22ea
@ -1,4 +1,4 @@
|
||||
version = '1.4.0'
|
||||
milestone = 'Yoitsu'
|
||||
release_number = '35'
|
||||
release_number = '36'
|
||||
projectURL = 'http://syncplay.pl/'
|
||||
|
@ -215,9 +215,14 @@ class VlcPlayer(BasePlayer):
|
||||
self._client.ui.showDebugMessage("Treating 'playing' response as 'paused' due to VLC EOF bug")
|
||||
self._pausedAsk.set()
|
||||
elif name == "position":
|
||||
newPosition = float(value.replace(",", ".")) if (value != "no-input" and self._filechanged == False) else self._client.getGlobalPosition()
|
||||
if newPosition == self._previousPosition and newPosition <> self._duration and not self._paused:
|
||||
self._client.ui.showDebugMessage("Not considering position {} duplicate as new time because of VLC time precision bug".format(newPosition))
|
||||
self._positionAsk.set()
|
||||
return
|
||||
self._previousPreviousPosition = self._previousPosition
|
||||
self._previousPosition = self._position
|
||||
self._position = float(value.replace(",", ".")) if (value != "no-input" and self._filechanged == False) else self._client.getGlobalPosition()
|
||||
self._position = newPosition
|
||||
if self._position < 0 and self._duration > 2147 and self._vlcVersion == "3.0.0":
|
||||
self.drop(getMessage("vlc-failed-versioncheck"))
|
||||
self._lastVLCPositionUpdate = time.time()
|
||||
|
Loading…
Reference in New Issue
Block a user