[rhythmbox] player-gst: don't stop the pipeline in about-to-finish handler (bug #585595)



commit 7e8864ae09b39c49a7c174f1eede0dfbece122f2
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sat Jul 4 18:16:03 2009 +1000

    player-gst: don't stop the pipeline in about-to-finish handler (bug #585595)
    
    about-to-finish is emitted on a streaming thread, so we can't change the
    pipeline state from there, and if there's nothing to play after the
    current track, we want to wait until it actually finishes.
    
    This is a bit of a hack, but it works for now.

 backends/gstreamer/rb-player-gst.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/backends/gstreamer/rb-player-gst.c b/backends/gstreamer/rb-player-gst.c
index 9e56d57..3626189 100644
--- a/backends/gstreamer/rb-player-gst.c
+++ b/backends/gstreamer/rb-player-gst.c
@@ -651,6 +651,15 @@ impl_close (RBPlayer *player, const char *uri, GError **error)
 		return TRUE;
 	}
 
+	if (mp->priv->current_track_finishing) {
+		/* this is a bit of a hack.
+		 * about-to-finish should result in either a track change or nothing.
+		 */
+		rb_debug ("not closing in about-to-finish callback");
+		mp->priv->current_track_finishing = FALSE;
+		return TRUE;
+	}
+
 	mp->priv->playing = FALSE;
 	mp->priv->buffering = FALSE;
 



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