From dd65b17b1f43034dd3fff516d62502e5e3f7fb3d Mon Sep 17 00:00:00 2001 From: Fabrice Bellet Date: Wed, 14 Jun 2017 12:44:49 +0200 Subject: [PATCH] nice transmitter: flush source before unlinking This patch prevents the nice source to fail on a not-linked to any sinkpads error, when receiving data after its source has been unlinked. To fix that, we send an eos event just before removing it. https://bugs.freedesktop.org/show_bug.cgi?id=100565 --- transmitters/nice/fs-nice-transmitter.c | 1 + 1 file changed, 1 insertion(+) diff --git a/transmitters/nice/fs-nice-transmitter.c b/transmitters/nice/fs-nice-transmitter.c index 51f2371..c1500e9 100644 --- a/transmitters/nice/fs-nice-transmitter.c +++ b/transmitters/nice/fs-nice-transmitter.c @@ -754,6 +754,7 @@ fs_nice_transmitter_free_gst_stream (FsNiceTransmitter *self, if (ns->nicesrcs[c]) { GstStateChangeReturn ret; + gst_element_send_event (ns->nicesrcs[c], gst_event_new_flush_start ()); if (!gst_bin_remove (GST_BIN (self->priv->gst_src), ns->nicesrcs[c])) GST_ERROR ("Could not remove nicesrc element from transmitter source"); ret = gst_element_set_state (ns->nicesrcs[c], GST_STATE_NULL); -- 2.9.4