Blame SOURCES/fs-element-notifiers-crash.patch

c51fd9
From e07685ff5e93346a86690fcf1b8449bf934c8da4 Mon Sep 17 00:00:00 2001
c51fd9
From: Fabrice Bellet <fabrice@bellet.info>
c51fd9
Date: Wed, 13 Jul 2016 16:00:05 +0200
c51fd9
Subject: [PATCH] call-window: properly remove the fs element notifiers
c51fd9
c51fd9
This patch removes the FsElementAddedNotifier from the pipeline
c51fd9
in the conference remove callback, instead of just unreferencing
c51fd9
them. This fixes a crash in the rtp-special-source stop thread
c51fd9
cleanup code.
c51fd9
c51fd9
https://bugzilla.gnome.org/show_bug.cgi?id=768889
c51fd9
---
c51fd9
 src/empathy-call-window.c | 19 ++++++++++++++++---
c51fd9
 1 file changed, 16 insertions(+), 3 deletions(-)
c51fd9
c51fd9
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
c51fd9
index a54346c..2bbbd0f 100644
c51fd9
--- a/src/empathy-call-window.c
c51fd9
+++ b/src/empathy-call-window.c
c51fd9
@@ -2513,17 +2513,30 @@ empathy_call_window_conference_added_cb (EmpathyCallHandler *handler,
c51fd9
 }
c51fd9
 
c51fd9
 static void
c51fd9
+empathy_call_window_add_notifier_remove (gpointer data, gpointer user_data)
c51fd9
+{
c51fd9
+  EmpathyCallWindow *self = EMPATHY_CALL_WINDOW (user_data);
c51fd9
+  EmpathyCallWindowPriv *priv = GET_PRIV (self);
c51fd9
+  FsElementAddedNotifier *notifier = data;
c51fd9
+
c51fd9
+  fs_element_added_notifier_remove (notifier, GST_BIN (priv->pipeline));
c51fd9
+}
c51fd9
+
c51fd9
+static void
c51fd9
 empathy_call_window_conference_removed_cb (EmpathyCallHandler *handler,
c51fd9
   GstElement *conference, gpointer user_data)
c51fd9
 {
c51fd9
   EmpathyCallWindow *self = EMPATHY_CALL_WINDOW (user_data);
c51fd9
   EmpathyCallWindowPriv *priv = GET_PRIV (self);
c51fd9
 
c51fd9
-  g_list_free_full (priv->notifiers, g_object_unref);
c51fd9
-  priv->notifiers = NULL;
c51fd9
-
c51fd9
   gst_bin_remove (GST_BIN (priv->pipeline), conference);
c51fd9
   gst_element_set_state (conference, GST_STATE_NULL);
c51fd9
+
c51fd9
+  g_list_foreach (priv->notifiers,
c51fd9
+    empathy_call_window_add_notifier_remove, user_data);
c51fd9
+
c51fd9
+  g_list_free_full (priv->notifiers, g_object_unref);
c51fd9
+  priv->notifiers = NULL;
c51fd9
 }
c51fd9
 
c51fd9
 static gboolean