From: Tim-Philipp Müller Date: Mon, 6 Aug 2012 19:04:09 +0000 (+0100) Subject: basesrc: don't try to answer URI queries with NULL URIs X-Git-Tag: RELEASE-0.11.93~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9427851fd2556bb19d40fb2fdd7fc313f82f5651;p=platform%2Fupstream%2Fgstreamer.git basesrc: don't try to answer URI queries with NULL URIs Should make unit tests in -base that use appsrc a bit happier. --- diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c index 1358321..8714ab9 100644 --- a/libs/gst/base/gstbasesrc.c +++ b/libs/gst/base/gstbasesrc.c @@ -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; }