mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
container: return TRUE if adding doesn't cause any errors
If `add_child` and `set_parent` succeed we want to return TRUE, even if the added element is no longer a child by the end of the method. This is because some users may call ges_container_remove during `child-added`. This shouldn't be considered an error.
This commit is contained in:
parent
7dd6bc4de2
commit
00a9825ffb
1 changed files with 2 additions and 1 deletions
|
@ -847,6 +847,8 @@ ges_container_add (GESContainer * container, GESTimelineElement * child)
|
|||
child);
|
||||
priv->adding_children = g_list_remove (priv->adding_children, child);
|
||||
|
||||
ret = TRUE;
|
||||
|
||||
done:
|
||||
/* thaw all notifies */
|
||||
/* Ignore notifies for the start and duration since the child should
|
||||
|
@ -857,7 +859,6 @@ done:
|
|||
g_object_thaw_notify (G_OBJECT (tmp->data));
|
||||
g_object_thaw_notify (G_OBJECT (child));
|
||||
g_list_free_full (current_children, gst_object_unref);
|
||||
ret = ! !g_list_find (container->children, child);
|
||||
gst_object_unref (child);
|
||||
container->children_control_mode = GES_CHILDREN_UPDATE;
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue