From: Thibault Saunier Date: Thu, 26 Jan 2012 10:53:54 +0000 (+0100) Subject: trackobject: Enable adding a TrackObject in a Track before a TimelineObject X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a762e72c13604e8e3d492c72d758d6e613c04961;p=platform%2Fupstream%2Fgst-editing-services.git trackobject: Enable adding a TrackObject in a Track before a TimelineObject We were requiring it only for GESCustomTimelineSource, but it is not actually necessary so, we can just check if the TrackObject is in a TimelineObject or not, and react accordingly. --- diff --git a/ges/ges-track-object.c b/ges/ges-track-object.c index 5702967..ec76d1f 100644 --- a/ges/ges-track-object.c +++ b/ges/ges-track-object.c @@ -728,7 +728,7 @@ ensure_gnl_object (GESTrackObject * object) GESTrackObjectClass *class; GstElement *gnlobject; GHashTable *props_hash; - gboolean res = FALSE; + gboolean res = TRUE; if (object->priv->gnlobject && object->priv->valid) return FALSE; @@ -760,9 +760,12 @@ ensure_gnl_object (GESTrackObject * object) if (gnlobject) { GST_DEBUG ("Got a valid GnlObject, now filling it in"); - res = - ges_timeline_object_fill_track_object (object->priv->timelineobj, - object, object->priv->gnlobject); + if (object->priv->timelineobj) + res = ges_timeline_object_fill_track_object (object->priv->timelineobj, + object, object->priv->gnlobject); + else + res = TRUE; + if (res) { /* Connect to property notifications */ /* FIXME : remember the signalids so we can remove them later on !!! */