mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 08:41:07 +00:00
gstreamer: parse: Don't assume that child proxy child objects are GstObjects
The name is already passed via the signal parameters so it doesn't have to be retrieved again via GstObject API, which would crash on other GObjects. Child proxy child objects can be any kind of GObject and the code here otherwise handles this correctly already. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6938>
This commit is contained in:
parent
79312357a6
commit
529f2472b3
1 changed files with 2 additions and 3 deletions
|
@ -451,8 +451,7 @@ static void gst_parse_new_child(GstChildProxy *child_proxy, GObject *object,
|
|||
goto error;
|
||||
g_object_set_property (target, pspec->name, &v);
|
||||
} else {
|
||||
const gchar *obj_name = GST_OBJECT_NAME(object);
|
||||
gint len = strlen (obj_name);
|
||||
gint len = strlen (name);
|
||||
|
||||
/*
|
||||
* We've been notified that a new child has beed added, but the
|
||||
|
@ -472,7 +471,7 @@ static void gst_parse_new_child(GstChildProxy *child_proxy, GObject *object,
|
|||
*/
|
||||
|
||||
/* Cases 1,2: The child just added corresponds to this delayed set */
|
||||
if ((strlen (set->name) > (len+2)) && !strncmp (set->name, obj_name, len)
|
||||
if ((strlen (set->name) > (len+2)) && !strncmp (set->name, name, len)
|
||||
&& !strncmp (&set->name[len], "::", 2)) {
|
||||
gchar *children = NULL;
|
||||
gchar *prop = NULL;
|
||||
|
|
Loading…
Reference in a new issue