ges: Avoid leaking the timeline when grouping containers

This commit is contained in:
Thibault Saunier 2013-06-28 19:15:59 -04:00 committed by Mathieu Duponchelle
parent 8bc88a2ba8
commit 7412de6f6c
2 changed files with 8 additions and 4 deletions

View file

@ -263,6 +263,8 @@ _add_child (GESContainer * container, GESTimelineElement * element)
guint max_prio, min_prio;
GESClipPrivate *priv = GES_CLIP (container)->priv;
g_return_val_if_fail (GES_IS_TRACK_ELEMENT (element), FALSE);
/* First make sure we work with a sorted list of GESTimelineElement-s */
_ges_container_sort_children (container);
@ -432,7 +434,7 @@ _group (GList * containers)
goto done;
}
clip = GES_CLIP (tmp->data);
tmptimeline = ges_timeline_element_get_timeline (element);
tmptimeline = GES_TIMELINE_ELEMENT_TIMELINE (element);
if (!timeline) {
GList *tmptrack;

View file

@ -652,7 +652,7 @@ ges_container_group (GList * containers)
g_return_val_if_fail (containers, NULL);
element = GES_TIMELINE_ELEMENT (containers->data);
timeline = ges_timeline_element_get_timeline (element);
timeline = GES_TIMELINE_ELEMENT_TIMELINE (element);
g_return_val_if_fail (timeline, NULL);
if (g_list_length (containers) == 1)
@ -660,8 +660,10 @@ ges_container_group (GList * containers)
for (tmp = containers; tmp; tmp = tmp->next) {
g_return_val_if_fail (GES_IS_CONTAINER (tmp->data), NULL);
g_return_val_if_fail (ges_timeline_element_get_timeline
(GES_TIMELINE_ELEMENT (tmp->data)) == timeline, NULL);
g_return_val_if_fail (GES_TIMELINE_ELEMENT_PARENT (tmp->data) == NULL,
NULL);
g_return_val_if_fail (GES_TIMELINE_ELEMENT_TIMELINE (tmp->data) == timeline,
NULL);
}
children_types = g_type_children (GES_TYPE_CONTAINER, &n_children);