fix: use exact seeking instead of keyframe-based seeking
mpv's "absolute" seek lands on the nearest keyframe before the target, causing playback to start ~3s before the marker. Switch to "absolute+exact" for both seek() and play_loop() so playback starts at the precise requested time. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2600,7 +2600,7 @@ class MpvWidget(QWidget):
|
||||
if self._player.duration is None:
|
||||
return
|
||||
try:
|
||||
self._player.seek(t, "absolute")
|
||||
self._player.seek(t, "absolute", "exact")
|
||||
except SystemError:
|
||||
pass
|
||||
|
||||
@@ -2608,7 +2608,7 @@ class MpvWidget(QWidget):
|
||||
self._player["ab-loop-a"] = a
|
||||
self._player["ab-loop-b"] = min(b, self._player.duration or b)
|
||||
if not resume:
|
||||
self._player.seek(a, "absolute")
|
||||
self._player.seek(a, "absolute", "exact")
|
||||
self._player.pause = False
|
||||
|
||||
def update_loop_end(self, b: float):
|
||||
|
||||
Reference in New Issue
Block a user