[rhythmbox] playbin2: ignore notify::source while changing to NULL
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] playbin2: ignore notify::source while changing to NULL
- Date: Sun, 22 Apr 2012 01:50:17 +0000 (UTC)
commit 1f9e7223f6ca55f6eb580b8ee95b459d98dc6031
Author: Jonathan Matthew <jonathan d14n org>
Date: Sun Apr 22 11:48:44 2012 +1000
playbin2: ignore notify::source while changing to NULL
backends/gstreamer/rb-player-gst.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/backends/gstreamer/rb-player-gst.c b/backends/gstreamer/rb-player-gst.c
index 70e3db3..d48634e 100644
--- a/backends/gstreamer/rb-player-gst.c
+++ b/backends/gstreamer/rb-player-gst.c
@@ -378,6 +378,7 @@ start_state_change (RBPlayerGst *mp, GstState state, enum StateChangeAction acti
{
GstStateChangeReturn scr;
+ rb_debug ("changing state to %s", gst_element_state_get_name (state));
mp->priv->state_change_action = action;
scr = gst_element_set_state (mp->priv->playbin, state);
if (scr == GST_STATE_CHANGE_SUCCESS) {
@@ -608,6 +609,12 @@ static void
source_notify_cb (GObject *object, GParamSpec *pspec, RBPlayerGst *player)
{
GstElement *source;
+
+ if (player->priv->uri == NULL) {
+ rb_debug ("got notify::source while changing to NULL");
+ return;
+ }
+
g_object_get (object, "source", &source, NULL);
g_signal_emit (player, signals[PREPARE_SOURCE], 0, player->priv->uri, source);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]