From 5504bdfb34c0a3061503a9bac47f9ba48bcfb12e Mon Sep 17 00:00:00 2001 From: Jakub Adam Date: Tue, 22 Feb 2011 19:03:46 +0100 Subject: [PATCH] Fix removal of FsStream using nice transmiter from running FsSession --- transmitters/nice/fs-nice-transmitter.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/transmitters/nice/fs-nice-transmitter.c b/transmitters/nice/fs-nice-transmitter.c index cd6cbea..336dc58 100644 --- a/transmitters/nice/fs-nice-transmitter.c +++ b/transmitters/nice/fs-nice-transmitter.c @@ -796,12 +796,14 @@ fs_nice_transmitter_free_gst_stream (FsNiceTransmitter *self, if (ns->nicesrcs[c]) { GstStateChangeReturn ret; - if (!gst_bin_remove (GST_BIN (self->priv->gst_src), ns->nicesrcs[c])) - GST_ERROR ("Could not remove nicesrc element from transmitter source"); + + gst_element_set_locked_state (ns->nicesrcs[c], TRUE); ret = gst_element_set_state (ns->nicesrcs[c], GST_STATE_NULL); if (ret != GST_STATE_CHANGE_SUCCESS) GST_ERROR ("Error changing state of nicesrc: %s", gst_element_state_change_return_get_name (ret)); + if (!gst_bin_remove (GST_BIN (self->priv->gst_src), ns->nicesrcs[c])) + GST_ERROR ("Could not remove nicesrc element from transmitter source"); gst_object_unref (ns->nicesrcs[c]); } -- 1.7.2.3