gst: uri query: fix inconsistent uri nullability assertion

Functions `gst_query_set_uri` and `gst_query_set_uri_redirection`
can both set a `NULL` `uri`, as annotated in the documentation.
However the functions bodies reject `NULL` `uri`s.

See [1] for a discussion on that matter.

[1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1134#note_1600988

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3237>
This commit is contained in:
François Laignel 2022-10-21 11:47:11 +02:00 committed by GStreamer Marge Bot
parent 426535f3a6
commit a5f3ccc037

View file

@ -1399,7 +1399,6 @@ gst_query_set_uri (GstQuery * query, const gchar * uri)
g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_URI);
g_return_if_fail (gst_query_is_writable (query));
g_return_if_fail (gst_uri_is_valid (uri));
structure = GST_QUERY_STRUCTURE (query);
gst_structure_id_set (structure, GST_QUARK (URI), G_TYPE_STRING, uri, NULL);
@ -1444,7 +1443,6 @@ gst_query_set_uri_redirection (GstQuery * query, const gchar * uri)
g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_URI);
g_return_if_fail (gst_query_is_writable (query));
g_return_if_fail (gst_uri_is_valid (uri));
structure = GST_QUERY_STRUCTURE (query);
gst_structure_id_set (structure, GST_QUARK (URI_REDIRECTION),