parse: Don't do delayed property setting for top-level properties.

If a property is supplied to gst-launch-1.0 to set on a property that
implements GstChildProxy, it would always accept any property name
and try to set it later. This means that (for example) decodebin
will accept and not complain about property names that can never exist like:

gst-launch-1.0 videotestsrc ! decodebin NON-EXISTING_PROPERTY=adsfdasf ! fakesink

Instead, only try to do deferred property setting for property names
that contain the :: separator that indicates it's a setting on a child
that might appear later.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/832>
This commit is contained in:
Jan Schmidt 2021-06-09 02:35:00 +10:00 committed by GStreamer Marge Bot
parent 5230cab38d
commit 7f29361488

View file

@ -398,7 +398,7 @@ static void gst_parse_element_set (gchar *value, GstElement *element, graph_t *g
}
gst_parse_unescape (pos);
if (GST_IS_CHILD_PROXY (element)) {
if (GST_IS_CHILD_PROXY (element) && strstr (value, "::") != NULL) {
if (!gst_child_proxy_lookup (GST_CHILD_PROXY (element), value, &target, &pspec)) {
/* do a delayed set */
gst_parse_add_delayed_set (element, value, pos);