From 3af6e05fb7f6b4acf430bc7f8de9bab485174176 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Sun, 3 May 2026 11:39:57 +0200 Subject: [PATCH] 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 --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 4e29e6c..f39a24a 100755 --- a/main.py +++ b/main.py @@ -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):