mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +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
22
gst/gstbin.c
22
gst/gstbin.c
|
@ -2432,13 +2432,31 @@ restart:
|
||||||
have_async = TRUE;
|
have_async = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GST_STATE_CHANGE_FAILURE:
|
case GST_STATE_CHANGE_FAILURE:{
|
||||||
|
GstObject *parent;
|
||||||
|
|
||||||
GST_CAT_INFO_OBJECT (GST_CAT_STATES, element,
|
GST_CAT_INFO_OBJECT (GST_CAT_STATES, element,
|
||||||
"child '%s' failed to go to state %d(%s)",
|
"child '%s' failed to go to state %d(%s)",
|
||||||
GST_ELEMENT_NAME (child),
|
GST_ELEMENT_NAME (child),
|
||||||
next, gst_element_state_get_name (next));
|
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);
|
gst_object_unref (child);
|
||||||
goto done;
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
case GST_STATE_CHANGE_NO_PREROLL:
|
case GST_STATE_CHANGE_NO_PREROLL:
|
||||||
GST_CAT_INFO_OBJECT (GST_CAT_STATES, element,
|
GST_CAT_INFO_OBJECT (GST_CAT_STATES, element,
|
||||||
"child '%s' changed state to %d(%s) successfully without preroll",
|
"child '%s' changed state to %d(%s) successfully without preroll",
|
||||||
|
|
Loading…
Reference in a new issue