mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
layer: call timeline_element_set_timeline in layer_set_timeline.
Summary: Otherwise if there was still a reference to the layer when it is removed from the timeline, it fails when the last reference is released, because timeline_element_set_timeline calls timeline_remove_element, which tries to remove the element from an already disposed hashtable. Reviewers: thiblahute Differential Revision: http://phabricator.freedesktop.org/D82
This commit is contained in:
parent
6753ad5bd1
commit
54190d9dd8
1 changed files with 8 additions and 1 deletions
|
@ -351,7 +351,8 @@ ges_layer_remove_clip (GESLayer * layer, GESClip * clip)
|
|||
/* inform the clip it's no longer in a layer */
|
||||
ges_clip_set_layer (clip, NULL);
|
||||
/* so neither in a timeline */
|
||||
ges_timeline_element_set_timeline (GES_TIMELINE_ELEMENT (clip), NULL);
|
||||
if (layer->timeline)
|
||||
ges_timeline_element_set_timeline (GES_TIMELINE_ELEMENT (clip), NULL);
|
||||
|
||||
/* Remove our reference to the clip */
|
||||
gst_object_unref (clip);
|
||||
|
@ -686,7 +687,13 @@ ges_layer_get_timeline (GESLayer * layer)
|
|||
void
|
||||
ges_layer_set_timeline (GESLayer * layer, GESTimeline * timeline)
|
||||
{
|
||||
GList *tmp;
|
||||
|
||||
GST_DEBUG ("layer:%p, timeline:%p", layer, timeline);
|
||||
|
||||
for (tmp = layer->priv->clips_start; tmp; tmp = tmp->next) {
|
||||
ges_timeline_element_set_timeline (tmp->data, timeline);
|
||||
}
|
||||
|
||||
layer->timeline = timeline;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue