mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 21:18:52 +00:00
ges-uri-asset: Fix GESDiscovererManager leaks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5552>
This commit is contained in:
parent
2dd65d8715
commit
8f18fde21a
1 changed files with 7 additions and 2 deletions
|
@ -712,10 +712,13 @@ void
|
||||||
ges_uri_clip_asset_class_set_timeout (GESUriClipAssetClass * klass,
|
ges_uri_clip_asset_class_set_timeout (GESUriClipAssetClass * klass,
|
||||||
GstClockTime timeout)
|
GstClockTime timeout)
|
||||||
{
|
{
|
||||||
|
GESDiscovererManager *manager;
|
||||||
|
|
||||||
g_return_if_fail (GES_IS_URI_CLIP_ASSET_CLASS (klass));
|
g_return_if_fail (GES_IS_URI_CLIP_ASSET_CLASS (klass));
|
||||||
|
|
||||||
ges_discoverer_manager_set_timeout (ges_discoverer_manager_get_default (),
|
manager = ges_discoverer_manager_get_default ();
|
||||||
timeout);
|
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_signal_connect (manager, "discovered",
|
||||||
G_CALLBACK (discoverer_discovered_cb), NULL);
|
G_CALLBACK (discoverer_discovered_cb), NULL);
|
||||||
|
|
||||||
|
gst_object_unref (manager);
|
||||||
|
|
||||||
discoverer = gst_discoverer_new (timeout, &err);
|
discoverer = gst_discoverer_new (timeout, &err);
|
||||||
if (!discoverer) {
|
if (!discoverer) {
|
||||||
GST_ERROR ("Could not create discoverer: %s", err->message);
|
GST_ERROR ("Could not create discoverer: %s", err->message);
|
||||||
|
|
Loading…
Reference in a new issue