Commit 9a45d0ef authored by Edward Hervey's avatar Edward Hervey 🤘 Committed by Edward Hervey
Browse files

ges: Fix a bunch of leaks

There are definitely more left, but don't have time for more debugging
parent baa83510
......@@ -983,6 +983,8 @@ ges_asset_request (GType extractable_type, const gchar * id, GError ** error)
_unsure_material_for_wrong_id (id, extractable_type, lerr);
real_id = g_strdup (id);
}
if (lerr)
g_error_free (lerr);
asset = ges_asset_cache_lookup (extractable_type, real_id);
if (asset) {
......
......@@ -486,6 +486,7 @@ _loading_done (GESFormatter * self)
for (tmp = assets; tmp; tmp = tmp->next) {
ges_asset_set_proxy (NULL, tmp->data);
}
g_list_free (assets);
g_hash_table_foreach (priv->layers, (GHFunc) _set_auto_transition, NULL);
ges_project_set_loaded (self->project, self);
......
......@@ -50,6 +50,7 @@ _fill_track_type (GESAsset * asset)
if (bin_desc) {
ges_track_element_asset_set_track_type (GES_TRACK_ELEMENT_ASSET (asset),
ttype);
g_free (bin_desc);
} else {
GST_WARNING_OBJECT (asset, "No track type set, you should"
" specify one in [audio, video] as first component" " in the asset id");
......
......@@ -71,6 +71,8 @@ extractable_check_id (GType type, const gchar * id, GError ** error)
else
g_assert_not_reached ();
g_free (bin_desc);
return real_id;
}
......
......@@ -1316,18 +1316,18 @@ gboolean
ges_timeline_element_add_child_property (GESTimelineElement * self,
GParamSpec * pspec, GObject * child)
{
gchar *signame = g_strconcat ("notify::", pspec->name, NULL);
gchar *signame;
ChildPropHandler *handler;
if (g_hash_table_contains (self->priv->children_props, pspec)) {
GST_INFO_OBJECT (self, "Child property already exists: %s", pspec->name);
return FALSE;
}
GST_DEBUG_OBJECT (self, "Adding child property: %" GST_PTR_FORMAT "::%s",
child, pspec->name);
signame = g_strconcat ("notify::", pspec->name, NULL);
handler = (ChildPropHandler *) g_slice_new0 (ChildPropHandler);
handler->child = gst_object_ref (child);
handler->handler_id =
......
......@@ -369,12 +369,14 @@ static void
_set_meta_file_size (const gchar * uri, GESUriClipAsset * asset)
{
GError *error = NULL;
GFileInfo *file_info;
GFileInfo *file_info = NULL;
guint64 file_size;
GFile *gfile = NULL;
GESMetaContainer *container = GES_META_CONTAINER (asset);
file_info = g_file_query_info (g_file_new_for_uri (uri), "standard::size",
gfile = g_file_new_for_uri (uri);
file_info = g_file_query_info (gfile, "standard::size",
G_FILE_QUERY_INFO_NONE, NULL, &error);
if (!error) {
file_size = g_file_info_get_attribute_uint64 (file_info, "standard::size");
......@@ -383,6 +385,10 @@ _set_meta_file_size (const gchar * uri, GESUriClipAsset * asset)
} else {
g_error_free (error);
}
if (gfile)
g_object_unref (gfile);
if (file_info)
g_object_unref (file_info);
}
static void
......
......@@ -1256,6 +1256,7 @@ _save_layers (GESXmlFormatter * self, GString * str, GESTimeline * timeline)
priv->nbelements++;
}
g_list_free_full (clips, (GDestroyNotify) gst_object_unref);
g_string_append (str, " </layer>\n");
}
}
......@@ -1318,6 +1319,7 @@ _save_groups (GESXmlFormatter * self, GString * str, GESTimeline * timeline)
for (tmp = ges_timeline_get_groups (timeline); tmp; tmp = tmp->next) {
_save_group (self, str, &seen_groups, tmp->data);
}
g_list_free (seen_groups);
g_string_append (str, " </groups>\n");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment