mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
ges: Avoid leaking the timeline when grouping containers
This commit is contained in:
parent
8bc88a2ba8
commit
7412de6f6c
2 changed files with 8 additions and 4 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue