From 1e9da26b685c666bfb59a461dc65b936c4cbb8cb Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Mon, 10 Feb 2020 17:15:13 -0300 Subject: [PATCH] discoverer: Start discovering next URI from right thread When using the cache, we were not using the right GMainContext to setup next URI to discovery, fix that. --- gst-libs/gst/pbutils/gstdiscoverer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/pbutils/gstdiscoverer.c b/gst-libs/gst/pbutils/gstdiscoverer.c index 25e47d57b1..2fb97cc9ab 100644 --- a/gst-libs/gst/pbutils/gstdiscoverer.c +++ b/gst-libs/gst/pbutils/gstdiscoverer.c @@ -2035,10 +2035,13 @@ start_discovering (GstDiscoverer * dc) if (dc->priv->async) { if (ready) { - g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, + GSource *source; + + source = g_idle_source_new (); + g_source_set_callback (source, (GSourceFunc) emit_discovererd_and_next, gst_object_ref (dc), gst_object_unref); - + g_source_attach (source, dc->priv->ctx); goto beach; }