From 11334118fa08eed2b3345570dc69c555d237b1fb Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Mon, 14 Jan 2019 18:28:52 -0300 Subject: [PATCH] formatter: sink ref of the temporary GESFormatter To accomodate formatters implemented with bindings/in python --- ges/ges-formatter.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ges/ges-formatter.c b/ges/ges-formatter.c index 2bc22e25f6..03fe4e25c6 100644 --- a/ges/ges-formatter.c +++ b/ges/ges-formatter.c @@ -241,7 +241,8 @@ ges_formatter_can_load_uri (const gchar * uri, GError ** error) class = g_type_class_ref (ges_asset_get_extractable_type (asset)); dummy_instance = - g_object_new (ges_asset_get_extractable_type (asset), NULL); + g_object_ref_sink (g_object_new (ges_asset_get_extractable_type (asset), + NULL)); if (class->can_load_uri (dummy_instance, uri, error)) { g_type_class_unref (class); gst_object_unref (dummy_instance); @@ -531,7 +532,8 @@ _find_formatter_asset_for_id (const gchar * id) asset = GES_ASSET (tmp->data); class = g_type_class_ref (ges_asset_get_extractable_type (asset)); dummy_instance = - g_object_new (ges_asset_get_extractable_type (asset), NULL); + g_object_ref_sink (g_object_new (ges_asset_get_extractable_type (asset), + NULL)); if (class->can_load_uri (dummy_instance, id, NULL)) { g_type_class_unref (class); asset = gst_object_ref (asset);