basesrc: don't try to answer URI queries with NULL URIs

Should make unit tests in -base that use appsrc a bit happier.
This commit is contained in:
Tim-Philipp Müller 2012-08-06 20:04:09 +01:00
parent 0d22988e5c
commit 9427851fd2

View file

@ -1206,9 +1206,13 @@ gst_base_src_default_query (GstBaseSrc * src, GstQuery * query)
if (GST_IS_URI_HANDLER (src)) {
gchar *uri = gst_uri_handler_get_uri (GST_URI_HANDLER (src));
gst_query_set_uri (query, uri);
g_free (uri);
res = TRUE;
if (uri != NULL) {
gst_query_set_uri (query, uri);
g_free (uri);
res = TRUE;
} else {
res = FALSE;
}
} else {
res = FALSE;
}