mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
gstreamer: parse: Make sure children are bins before recursing in
A deferred set of the form parentbin::childelement::pad works in the non-deferred property setting path, but the deferred path assumes that all non-root non-leaf children specify bins. We already have a bin check on the root, so let's add one for other non-leaves to avoid a critical. Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3806 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7519>
This commit is contained in:
parent
389302eb96
commit
ba69987114
1 changed files with 5 additions and 0 deletions
|
@ -370,6 +370,11 @@ static void gst_parse_add_delayed_set (GstElement *element, gchar *name, gchar *
|
||||||
parent = gst_bin_get_by_name (GST_BIN_CAST (element), current[0]);
|
parent = gst_bin_get_by_name (GST_BIN_CAST (element), current[0]);
|
||||||
current++;
|
current++;
|
||||||
while (parent && current[0]) {
|
while (parent && current[0]) {
|
||||||
|
if (!GST_IS_BIN (parent)) {
|
||||||
|
GST_INFO ("Not recursing into non-bin child %s",
|
||||||
|
gst_object_get_name (GST_OBJECT (parent)));
|
||||||
|
break;
|
||||||
|
}
|
||||||
child = gst_bin_get_by_name (GST_BIN (parent), current[0]);
|
child = gst_bin_get_by_name (GST_BIN (parent), current[0]);
|
||||||
if (!child && current[1]) {
|
if (!child && current[1]) {
|
||||||
char *sub_name = g_strjoinv ("::", ¤t[0]);
|
char *sub_name = g_strjoinv ("::", ¤t[0]);
|
||||||
|
|
Loading…
Reference in a new issue