From 3c127d96220446e9e10d1d641746dd51ba6eaec6 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 23 Jul 2015 11:42:48 +0200 Subject: [PATCH] ges: Do not leak and uselessly create errors And avoid parenthesis in GstObject names --- ges/ges-structured-interface.c | 5 +++-- ges/ges-track.c | 6 ++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ges/ges-structured-interface.c b/ges/ges-structured-interface.c index 11ff2bcb13..329018ab1f 100644 --- a/ges/ges-structured-interface.c +++ b/ges/ges-structured-interface.c @@ -419,11 +419,12 @@ _ges_add_clip_from_struct (GESTimeline * timeline, GstStructure * structure, if (name && !ges_timeline_element_set_name (GES_TIMELINE_ELEMENT (clip), name)) { res = FALSE; - g_error_new (GES_ERROR, 0, "couldn't set name %s on clip with id %s", + *error = + g_error_new (GES_ERROR, 0, "couldn't set name %s on clip with id %s", name, asset_id); } } else { - g_error_new (GES_ERROR, 0, + *error = g_error_new (GES_ERROR, 0, "Couldn't add clip with id %s to layer with priority %d", asset_id, layer_priority); } diff --git a/ges/ges-track.c b/ges/ges-track.c index 95e76a33d8..e573f85ad9 100644 --- a/ges/ges-track.c +++ b/ges/ges-track.c @@ -491,12 +491,10 @@ ges_track_constructed (GObject * object) if (self->type == GES_TRACK_TYPE_VIDEO) { componame = - g_strdup_printf ("(video)%s", - GST_OBJECT_NAME (self->priv->composition)); + g_strdup_printf ("video_%s", GST_OBJECT_NAME (self->priv->composition)); } else if (self->type == GES_TRACK_TYPE_AUDIO) { componame = - g_strdup_printf ("(audio)%s", - GST_OBJECT_NAME (self->priv->composition)); + g_strdup_printf ("audio_%s", GST_OBJECT_NAME (self->priv->composition)); } if (componame) { -- 2.34.1