[empathy/gnome-3-12] call-window: properly remove the fs element notifiers



commit e07685ff5e93346a86690fcf1b8449bf934c8da4
Author: Fabrice Bellet <fabrice bellet info>
Date:   Wed Jul 13 16:00:05 2016 +0200

    call-window: properly remove the fs element notifiers
    
    This patch removes the FsElementAddedNotifier from the pipeline
    in the conference remove callback, instead of just unreferencing
    them. This fixes a crash in the rtp-special-source stop thread
    cleanup code.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=768889

 src/empathy-call-window.c |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index a54346c..2bbbd0f 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -2513,17 +2513,30 @@ empathy_call_window_conference_added_cb (EmpathyCallHandler *handler,
 }
 
 static void
+empathy_call_window_add_notifier_remove (gpointer data, gpointer user_data)
+{
+  EmpathyCallWindow *self = EMPATHY_CALL_WINDOW (user_data);
+  EmpathyCallWindowPriv *priv = GET_PRIV (self);
+  FsElementAddedNotifier *notifier = data;
+
+  fs_element_added_notifier_remove (notifier, GST_BIN (priv->pipeline));
+}
+
+static void
 empathy_call_window_conference_removed_cb (EmpathyCallHandler *handler,
   GstElement *conference, gpointer user_data)
 {
   EmpathyCallWindow *self = EMPATHY_CALL_WINDOW (user_data);
   EmpathyCallWindowPriv *priv = GET_PRIV (self);
 
-  g_list_free_full (priv->notifiers, g_object_unref);
-  priv->notifiers = NULL;
-
   gst_bin_remove (GST_BIN (priv->pipeline), conference);
   gst_element_set_state (conference, GST_STATE_NULL);
+
+  g_list_foreach (priv->notifiers,
+    empathy_call_window_add_notifier_remove, user_data);
+
+  g_list_free_full (priv->notifiers, g_object_unref);
+  priv->notifiers = NULL;
 }
 
 static gboolean


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