diff --git a/ges/ges-project.c b/ges/ges-project.c index 634a38d23f..67ff95c18a 100644 --- a/ges/ges-project.c +++ b/ges/ges-project.c @@ -872,7 +872,7 @@ ges_project_create_asset_sync (GESProject * project, const gchar * id, if ((asset = g_hash_table_lookup (project->priv->assets, internal_id))) { g_free (internal_id); - return asset; + return gst_object_ref (asset); } else if (g_hash_table_lookup (project->priv->loading_assets, internal_id) || g_hash_table_lookup (project->priv->loaded_with_error, internal_id)) { g_free (internal_id); @@ -1059,9 +1059,10 @@ ges_project_list_assets (GESProject * project, GType filter) * @project: A #GESProject to save * @timeline: The #GESTimeline to save, it must have been extracted from @project * @uri: The uri where to save @project and @timeline - * @formatter_asset: (allow-none): The formatter asset to use or %NULL. If %NULL, - * will try to save in the same format as the one from which the timeline as been loaded - * or default to the best formatter as defined in #ges_find_formatter_for_uri + * @formatter_asset: (transfer full) (allow-none): The formatter asset to + * use or %NULL. If %NULL, will try to save in the same format as the one + * from which the timeline as been loaded or default to the best formatter + * as defined in #ges_find_formatter_for_uri * @overwrite: %TRUE to overwrite file if it exists * @error: (out) (allow-none): An error to be set in case something wrong happens or %NULL * diff --git a/tests/check/ges/asset.c b/tests/check/ges/asset.c index 3affc34454..d8cb49b7bf 100644 --- a/tests/check/ges/asset.c +++ b/tests/check/ges/asset.c @@ -240,6 +240,9 @@ GST_START_TEST (test_uri_clip_change_asset) g_free (uri); g_free (uri1); + gst_object_unref (asset1); + gst_object_unref (asset); + ges_deinit (); } diff --git a/tests/check/ges/backgroundsource.c b/tests/check/ges/backgroundsource.c index c9681c0785..09bdabfe8d 100644 --- a/tests/check/ges/backgroundsource.c +++ b/tests/check/ges/backgroundsource.c @@ -395,6 +395,7 @@ GST_START_TEST (test_gap_filling_empty_track) gap_object_check (gap, 0, 10, 1); fail_unless (ges_timeline_commit (timeline)); + gst_object_unref (asset); gst_object_unref (timeline); } diff --git a/tests/check/ges/clip.c b/tests/check/ges/clip.c index 261d74aeac..9a1ad34b87 100644 --- a/tests/check/ges/clip.c +++ b/tests/check/ges/clip.c @@ -1037,6 +1037,7 @@ GST_START_TEST (test_clip_group_ungroup) assert_num_in_track (video_track, 3); gst_object_unref (timeline); + gst_object_unref (asset); ges_deinit (); } @@ -1538,6 +1539,7 @@ GST_START_TEST (test_adding_children_to_track) ges_clip_get_top_effect_index (clip, GES_BASE_EFFECT (effect2))); gst_object_unref (timeline); + gst_object_unref (asset); ges_deinit (); } diff --git a/tests/check/ges/group.c b/tests/check/ges/group.c index c5dbc96cdd..6c6002b243 100644 --- a/tests/check/ges/group.c +++ b/tests/check/ges/group.c @@ -716,6 +716,7 @@ GST_START_TEST (test_group_serialization) g_free (tmpuri); gst_object_unref (timeline); + gst_object_unref (asset); ges_deinit (); } @@ -848,6 +849,7 @@ GST_START_TEST (test_children_properties_contain) free_children_properties (child_props2, num_props2); gst_object_unref (timeline); + gst_object_unref (asset); ges_deinit (); } diff --git a/tests/check/ges/layer.c b/tests/check/ges/layer.c index db07365a58..763e78a081 100644 --- a/tests/check/ges/layer.c +++ b/tests/check/ges/layer.c @@ -460,6 +460,7 @@ GST_START_TEST (test_single_layer_automatic_transition) g_list_free_full (objects, gst_object_unref); gst_object_unref (timeline); + gst_object_unref (asset); ges_deinit (); } @@ -928,6 +929,7 @@ GST_START_TEST (test_multi_layer_automatic_transition) ASSERT_OBJECT_REFCOUNT (transition, "layer + timeline", 2); gst_object_unref (timeline); + gst_object_unref (asset); ges_deinit (); } @@ -1162,6 +1164,7 @@ GST_START_TEST (test_layer_activate_automatic_transition) gst_object_unref (timeline); + gst_object_unref (asset); ges_deinit (); }