ges-uri-asset: Fix GESDiscovererManager leaks

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5552>
This commit is contained in:
Philippe Normand 2023-10-25 14:17:03 +01:00 committed by GStreamer Marge Bot
parent 2dd65d8715
commit 8f18fde21a

View file

@ -712,10 +712,13 @@ void
ges_uri_clip_asset_class_set_timeout (GESUriClipAssetClass * klass,
GstClockTime timeout)
{
GESDiscovererManager *manager;
g_return_if_fail (GES_IS_URI_CLIP_ASSET_CLASS (klass));
ges_discoverer_manager_set_timeout (ges_discoverer_manager_get_default (),
timeout);
manager = ges_discoverer_manager_get_default ();
ges_discoverer_manager_set_timeout (manager, timeout);
gst_object_unref (manager);
}
/**
@ -921,6 +924,8 @@ _ges_uri_asset_ensure_setup (gpointer uriasset_class)
g_signal_connect (manager, "discovered",
G_CALLBACK (discoverer_discovered_cb), NULL);
gst_object_unref (manager);
discoverer = gst_discoverer_new (timeout, &err);
if (!discoverer) {
GST_ERROR ("Could not create discoverer: %s", err->message);