nlecomposition: Do not fail when removing/adding child without commiting

Summary:
We use to end up removing the nleobject when the following case happened:

 * add an object
 * remove that object
 * re add the object
 * commit the composition

Reviewers: Mathieu_Du

Differential Revision: http://phabricator.freedesktop.org/D193
This commit is contained in:
Thibault Saunier 2015-01-12 13:05:30 +01:00
parent 3ba6dec976
commit 4f70e5eb88

View file

@ -696,6 +696,14 @@ _add_object_func (NleComposition * comp, ChildIOData * childio)
in_pending_io = g_hash_table_lookup (priv->pending_io, object);
if (g_hash_table_contains (priv->objects_hash, object)) {
if (in_pending_io) {
GST_INFO_OBJECT (comp, "Object already in but marked in pendings"
" removing from pendings");
g_hash_table_remove (priv->pending_io, object);
return;
}
GST_ERROR_OBJECT (comp, "Object %" GST_PTR_FORMAT " is "
" already in the composition", object);