mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
bin: Ignore state change failures from children that were removed from the bin already
Fixes bug #584441.
This commit is contained in:
parent
08ae8a1afb
commit
df741e7e2f
1 changed files with 20 additions and 2 deletions
20
gst/gstbin.c
20
gst/gstbin.c
|
@ -2432,13 +2432,31 @@ restart:
|
|||
have_async = TRUE;
|
||||
break;
|
||||
}
|
||||
case GST_STATE_CHANGE_FAILURE:
|
||||
case GST_STATE_CHANGE_FAILURE:{
|
||||
GstObject *parent;
|
||||
|
||||
GST_CAT_INFO_OBJECT (GST_CAT_STATES, element,
|
||||
"child '%s' failed to go to state %d(%s)",
|
||||
GST_ELEMENT_NAME (child),
|
||||
next, gst_element_state_get_name (next));
|
||||
|
||||
/* Only fail if the child is still inside
|
||||
* this bin. It might've been removed already
|
||||
* because of the error by the bin subclass
|
||||
* to ignore the error.
|
||||
*/
|
||||
parent = gst_object_get_parent (GST_OBJECT_CAST (child));
|
||||
if (parent == GST_OBJECT_CAST (element)) {
|
||||
gst_object_unref (child);
|
||||
gst_object_unref (parent);
|
||||
goto done;
|
||||
}
|
||||
if (parent)
|
||||
gst_object_unref (parent);
|
||||
gst_object_unref (child);
|
||||
|
||||
break;
|
||||
}
|
||||
case GST_STATE_CHANGE_NO_PREROLL:
|
||||
GST_CAT_INFO_OBJECT (GST_CAT_STATES, element,
|
||||
"child '%s' changed state to %d(%s) successfully without preroll",
|
||||
|
|
Loading…
Reference in a new issue