From 3fe4c865a4dd75f8292c62fda17861e42e042bd6 Mon Sep 17 00:00:00 2001 From: Fabrice Bellet Date: Mon, 3 Apr 2017 14:16:38 +0200 Subject: [PATCH] rtp: stop the transmitter before unlinking its sink (case 1) This patch prevents the nice source to fail, when receiving data after its sink has been unlinked. It happens while destroying a farstream session. empathy-Message: Element error: Internal data stream error. -- gstbasesrc.c(2950): gst_base_src_loop (): /GstPipeline:pipeline2/FsRtpConference:fsrtpconference2/GstBin:bin16/GstNiceSrc:nicesrc10: streaming stopped, reason not-linked (-1) --- gst/fsrtpconference/fs-rtp-session.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c index 364eec5..5f1c464 100644 --- a/gst/fsrtpconference/fs-rtp-session.c +++ b/gst/fsrtpconference/fs-rtp-session.c @@ -641,6 +641,10 @@ fs_rtp_session_dispose (GObject *obj) /* Lets stop all of the elements sink to source */ + if (self->priv->transmitters) + g_hash_table_foreach (self->priv->transmitters, _stop_transmitter_elem, + "gst-src"); + /* First the send pipeline */ if (self->priv->transmitters) g_hash_table_foreach (self->priv->transmitters, _stop_transmitter_elem, @@ -751,10 +755,6 @@ fs_rtp_session_dispose (GObject *obj) stop_and_remove (conferencebin, &self->priv->transmitter_rtp_funnel, TRUE); stop_and_remove (conferencebin, &self->priv->transmitter_rtcp_funnel, TRUE); - if (self->priv->transmitters) - g_hash_table_foreach (self->priv->transmitters, _stop_transmitter_elem, - "gst-src"); - self->priv->extra_sources = fs_rtp_special_sources_destroy (self->priv->extra_sources); -- 2.9.3