[rhythmbox] xfade: actually unlock the stream before returning if linking fails



commit c3e7511a393ce4857133af8ccbc95382a8be8ab5
Author: Jonathan Matthew <jonathan d14n org>
Date:   Tue Jun 8 07:35:26 2021 +1000

    xfade: actually unlock the stream before returning if linking fails
    
    This error case doesn't happen much, and the pipeline is unlikely to
    recover from it, but at least it won't deadlock now.

 backends/gstreamer/rb-player-gst-xfade.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/backends/gstreamer/rb-player-gst-xfade.c b/backends/gstreamer/rb-player-gst-xfade.c
index 9d6bf0801..dfa35145a 100644
--- a/backends/gstreamer/rb-player-gst-xfade.c
+++ b/backends/gstreamer/rb-player-gst-xfade.c
@@ -1155,8 +1155,8 @@ link_and_unblock_stream (RBXFadeStream *stream, GError **error)
                                     RB_PLAYER_ERROR,
                                     RB_PLAYER_ERROR_GENERAL,
                                     _("Failed to link new stream into GStreamer pipeline"));
-                       return FALSE;
                        g_mutex_unlock (&stream->lock);
+                       return FALSE;
                }
 
                g_atomic_int_inc (&player->priv->linked_streams);


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