diff options
author | Fabrice Bellet <fabrice@bellet.info> | 2016-07-13 16:00:05 +0200 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@gnome.org> | 2016-07-22 08:53:29 -0500 |
commit | e07685ff5e93346a86690fcf1b8449bf934c8da4 (patch) | |
tree | 808e8945fce11922b7adab8b27d47617e0facb7c /src | |
parent | f1b1b75e6772502290cbff5be2c8f31b61bdb6df (diff) | |
download | empathy-e07685ff5e93346a86690fcf1b8449bf934c8da4.tar.gz |
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
Diffstat (limited to 'src')
-rw-r--r-- | 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 a54346c6d..2bbbd0f1b 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 |