This way, the Track::track-object-added is emited after the TrackObject is ready to be used, and it make the API easier to use.
GESTrack * track)
{
GESTrackObject *result;
- gboolean ret;
result = ges_timeline_object_create_track_object (object, track);
if (!result) {
return FALSE;
}
- ret = ges_track_add_object (track, result);
- ges_timeline_object_add_track_object (object, result);
+ if (ges_timeline_object_add_track_object (object, result) == FALSE)
+ return FALSE;
- return ret;
+ return ges_track_add_object (track, result);
}
/**