ges: Do not leak and uselessly create errors

And avoid parenthesis in GstObject names
This commit is contained in:
Thibault Saunier 2015-07-23 11:42:48 +02:00
parent 254c2b1f5e
commit 3c127d9622
2 changed files with 5 additions and 6 deletions

View file

@ -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);
}

View file

@ -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) {