[gnome-music/wip/mschraal/gapless-v3] gstplayer: Do not seek to exact end
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/gapless-v3] gstplayer: Do not seek to exact end
- Date: Sat, 4 May 2019 14:10:15 +0000 (UTC)
commit 06abe45a75f58b4e68c9943864d800636023be37
Author: Marinus Schraal <mschraal gnome org>
Date: Sat May 4 13:55:05 2019 +0200
gstplayer: Do not seek to exact end
Seeking to the exact end of a song in combination with gapless playback
triggers a stream error.
Make sure to never seek to the exact endpoint of a stream.
gnomemusic/gstplayer.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/gstplayer.py b/gnomemusic/gstplayer.py
index f4a79a2e..d6491622 100644
--- a/gnomemusic/gstplayer.py
+++ b/gnomemusic/gstplayer.py
@@ -315,10 +315,13 @@ class GstPlayer(GObject.GObject):
:param float seconds: Position in seconds to seek
"""
+ if seconds > 0:
+ seconds = (seconds * Gst.SECOND) - 1
+
# FIXME: seek should be signalled to MPRIS
self._player.seek_simple(
Gst.Format.TIME, Gst.SeekFlags.FLUSH | Gst.SeekFlags.KEY_UNIT,
- seconds * Gst.SECOND)
+ seconds)
@log
def _start_plugin_installation(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]