query: return NULL when parsing uri redirection that was not set

https://bugzilla.gnome.org/show_bug.cgi?id=706160
This commit is contained in:
Arnaud Vrac 2013-08-16 20:36:53 +02:00 committed by Sebastian Dröge
parent 98d8cdfda4
commit 9819e48b92

View file

@ -1461,7 +1461,11 @@ gst_query_parse_uri_redirection (GstQuery * query, gchar ** uri)
g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_URI);
structure = GST_QUERY_STRUCTURE (query);
gst_structure_id_get (structure, GST_QUARK (URI_REDIRECTION), uri, NULL);
if (uri) {
if (!gst_structure_id_get (structure, GST_QUARK (URI_REDIRECTION),
G_TYPE_STRING, uri, NULL))
*uri = NULL;
}
}
/**