[gnome-music/wip/mschraal/gapless-v3: 155/155] gstplayer: Do not seek to exact end



commit c167f60be48c732f9052cdbbbfd11622ae548405
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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gnomemusic/gstplayer.py b/gnomemusic/gstplayer.py
index f4a79a2e..ece7fa78 100644
--- a/gnomemusic/gstplayer.py
+++ b/gnomemusic/gstplayer.py
@@ -318,7 +318,7 @@ class GstPlayer(GObject.GObject):
         # 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 * Gst.SECOND) - 1)
 
     @log
     def _start_plugin_installation(


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]