From 77362bb811226d3d689c14fb5af236d3cfc96ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Mon, 5 Jun 2017 19:26:42 -0400 Subject: [PATCH] nice transmitter: Flush source before stopping Otherwise we risk a deadlock in some cases 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..c84fcae 100644 --- a/transmitters/nice/fs-nice-transmitter.c +++ b/transmitters/nice/fs-nice-transmitter.c @@ -756,6 +756,7 @@ fs_nice_transmitter_free_gst_stream (FsNiceTransmitter *self, 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_send_event (ns->nicesrcs[c], gst_event_new_flush_start ()); 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", -- 2.9.4