[rhythmbox/gstreamer-1.0: 38/39] xfade: don't hold stream lock while sending seeks



commit 06b169cc00392e6f49e992464c6aa690d55c2a70
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sun Dec 2 20:38:35 2012 +1000

    xfade: don't hold stream lock while sending seeks
    
    This inverts a lock order taken elsewhere, so it can deadlock
    if you're unlucky.

 backends/gstreamer/rb-player-gst-xfade.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/backends/gstreamer/rb-player-gst-xfade.c b/backends/gstreamer/rb-player-gst-xfade.c
index 15f6b65..db6f832 100644
--- a/backends/gstreamer/rb-player-gst-xfade.c
+++ b/backends/gstreamer/rb-player-gst-xfade.c
@@ -1180,7 +1180,6 @@ perform_seek (RBXFadeStream *stream)
 	GstEvent *event;
 
 	rb_debug ("sending seek event..");
-	g_mutex_lock (&stream->lock);
 
 	event = gst_event_new_seek (1.0, GST_FORMAT_TIME,
 				    GST_SEEK_FLAG_FLUSH,
@@ -1188,6 +1187,7 @@ perform_seek (RBXFadeStream *stream)
 				    GST_SEEK_TYPE_NONE, -1);
 	gst_pad_send_event (stream->src_pad, event);
 
+	g_mutex_lock (&stream->lock);
 	switch (stream->state) {
 	case SEEKING:
 		stream->state = PLAYING;



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