query: return NULL when parsing uri redirection that was not set
authorArnaud Vrac <avrac@freebox.fr>
Fri, 16 Aug 2013 18:36:53 +0000 (20:36 +0200)
committerSebastian Dröge <slomo@circular-chaos.org>
Mon, 19 Aug 2013 08:11:24 +0000 (10:11 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=706160

gst/gstquery.c

index f15708a..3b9eddc 100644 (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;
+  }
 }
 
 /**