summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVineeth TM <vineeth.tm@samsung.com>2015-08-18 09:06:39 +0900
committerSebastian Dröge <sebastian@centricular.com>2015-08-18 12:13:41 +0300
commitfd7724b6e1114acde47360988ae38a4cf691f8a7 (patch)
tree872aff96200e44b88d846b21455c5dbe8e0bbbf8
parent6ee8b22c403bb15407ca012e54cf463c1b24ed13 (diff)
pbutils: discoverer: Set GError when NULL info is being returned.
When discovering the URI, if info is NULL, then instead of just returning NULL, set the GError, so the error can be printed and notified. https://bugzilla.gnome.org/show_bug.cgi?id=753701
-rw-r--r--gst-libs/gst/pbutils/gstdiscoverer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gst-libs/gst/pbutils/gstdiscoverer.c b/gst-libs/gst/pbutils/gstdiscoverer.c
index de9eb3a09..2964933d5 100644
--- a/gst-libs/gst/pbutils/gstdiscoverer.c
+++ b/gst-libs/gst/pbutils/gstdiscoverer.c
@@ -2107,6 +2107,9 @@ gst_discoverer_discover_uri (GstDiscoverer * discoverer, const gchar * uri,
if (G_UNLIKELY (discoverer->priv->current_info)) {
DISCO_UNLOCK (discoverer);
GST_WARNING_OBJECT (discoverer, "Already handling a uri");
+ if (err)
+ *err = g_error_new (GST_CORE_ERROR, GST_CORE_ERROR_FAILED,
+ "Already handling a uri");
return NULL;
}