gst_child_proxy_get_property: accept G_VALUE_INIT

gst_child_proxy_get_property() can now take a value initialized to
G_VALUE_INIT.  This parallels the corresponding change in
g_object_get_property(), GLib 2.60+.

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/724#note_738531

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/809>
This commit is contained in:
Chris White 2021-04-02 19:48:26 -04:00 committed by Sebastian Dröge
parent 1a8dfdfc54
commit b48e32ab00

View file

@ -264,11 +264,15 @@ gst_child_proxy_get_property (GstChildProxy * object, const gchar * name,
g_return_if_fail (GST_IS_CHILD_PROXY (object));
g_return_if_fail (name != NULL);
g_return_if_fail (G_IS_VALUE (value));
g_return_if_fail (value != NULL);
if (!gst_child_proxy_lookup (object, name, &target, &pspec))
goto not_found;
if (!G_IS_VALUE (value)) {
g_value_init (value, pspec->value_type);
}
g_object_get_property (target, pspec->name, value);
gst_object_unref (target);