mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
timeline: Avoid possible crash disposing the timeline
This commit is contained in:
parent
106d4e98f5
commit
799c11b58c
1 changed files with 7 additions and 4 deletions
|
@ -338,7 +338,7 @@ ges_timeline_dispose (GObject * object)
|
||||||
{
|
{
|
||||||
GESTimeline *tl = GES_TIMELINE (object);
|
GESTimeline *tl = GES_TIMELINE (object);
|
||||||
GESTimelinePrivate *priv = tl->priv;
|
GESTimelinePrivate *priv = tl->priv;
|
||||||
GList *tmp;
|
GList *tmp, *groups;
|
||||||
|
|
||||||
while (tl->layers) {
|
while (tl->layers) {
|
||||||
GESLayer *layer = (GESLayer *) tl->layers->data;
|
GESLayer *layer = (GESLayer *) tl->layers->data;
|
||||||
|
@ -353,11 +353,14 @@ ges_timeline_dispose (GObject * object)
|
||||||
while (tl->tracks)
|
while (tl->tracks)
|
||||||
ges_timeline_remove_track (GES_TIMELINE (object), tl->tracks->data);
|
ges_timeline_remove_track (GES_TIMELINE (object), tl->tracks->data);
|
||||||
|
|
||||||
for (tmp = priv->groups; tmp; tmp = tmp->next)
|
groups = g_list_copy (priv->groups);
|
||||||
g_list_free_full (ges_container_ungroup (tmp->data, FALSE),
|
for (tmp = groups; tmp; tmp = tmp->next) {
|
||||||
gst_object_unref);
|
GList *elems = ges_container_ungroup (tmp->data, FALSE);
|
||||||
|
|
||||||
|
g_list_free_full (elems, gst_object_unref);
|
||||||
|
}
|
||||||
g_list_free (priv->groups);
|
g_list_free (priv->groups);
|
||||||
|
g_list_free (groups);
|
||||||
|
|
||||||
g_hash_table_unref (priv->by_start);
|
g_hash_table_unref (priv->by_start);
|
||||||
g_hash_table_unref (priv->by_end);
|
g_hash_table_unref (priv->by_end);
|
||||||
|
|
Loading…
Reference in a new issue