rhythmbox r5873 - in trunk: . backends/gstreamer
- From: jmatthew svn gnome org
- To: svn-commits-list gnome org
- Subject: rhythmbox r5873 - in trunk: . backends/gstreamer
- Date: Sun, 31 Aug 2008 22:36:10 +0000 (UTC)
Author: jmatthew
Date: Sun Aug 31 22:36:10 2008
New Revision: 5873
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=5873&view=rev
Log:
2008-09-01 Jonathan Matthew <jonathan d14n org>
* backends/gstreamer/rb-player-gst-xfade.c: (unlink_blocked_cb):
Take the sink lock earlier to protect against our pad block
callback being called simulatenously on multiple threads.
(stop_sink):
Perform downward state changes from sink to source, as GStreamer
itself does. Should fix occasional deadlocking.
Modified:
trunk/ChangeLog
trunk/backends/gstreamer/rb-player-gst-xfade.c
Modified: trunk/backends/gstreamer/rb-player-gst-xfade.c
==============================================================================
--- trunk/backends/gstreamer/rb-player-gst-xfade.c (original)
+++ trunk/backends/gstreamer/rb-player-gst-xfade.c Sun Aug 31 22:36:10 2008
@@ -1242,8 +1242,11 @@
static void
unlink_blocked_cb (GstPad *pad, gboolean blocked, RBXFadeStream *stream)
{
+ g_static_rec_mutex_lock (&stream->player->priv->sink_lock);
+
if (stream->adder_pad == NULL) {
rb_debug ("stream %s is already unlinked. huh?", stream->uri);
+ g_static_rec_mutex_unlock (&stream->player->priv->sink_lock);
return;
}
@@ -1253,7 +1256,6 @@
g_warning ("Couldn't unlink stream %s: things will probably go quite badly from here on", stream->uri);
}
- g_static_rec_mutex_lock (&stream->player->priv->sink_lock);
stream->player->priv->linked_streams--;
rb_debug ("%d linked streams left", stream->player->priv->linked_streams);
@@ -2732,19 +2734,19 @@
player->priv->tick_timeout_id = 0;
}
- sr = gst_element_set_state (player->priv->silencebin, GST_STATE_READY);
+ sr = gst_element_set_state (player->priv->outputbin, GST_STATE_READY);
if (sr == GST_STATE_CHANGE_FAILURE) {
- rb_debug ("couldn't stop silence bin");
+ rb_debug ("couldn't stop output bin");
return FALSE;
}
sr = gst_element_set_state (player->priv->adder, GST_STATE_READY);
if (sr == GST_STATE_CHANGE_FAILURE) {
- rb_debug ("couldn't stop silence bin");
+ rb_debug ("couldn't stop adder");
return FALSE;
}
- sr = gst_element_set_state (player->priv->outputbin, GST_STATE_READY);
+ sr = gst_element_set_state (player->priv->silencebin, GST_STATE_READY);
if (sr == GST_STATE_CHANGE_FAILURE) {
rb_debug ("couldn't stop silence bin");
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]