[gst-cvs] gst-plugins-bad: dataurisrc: don' t post error message when setting the URI failed

Tim Mueller tpm at kemper.freedesktop.org
Wed Jan 27 16:10:10 PST 2010


Module: gst-plugins-bad
Branch: master
Commit: 766c52766e1bd11b674b691f2c08be2239e2e7e9
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=766c52766e1bd11b674b691f2c08be2239e2e7e9

Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date:   Wed Jan 27 23:46:32 2010 +0000

dataurisrc: don't post error message when setting the URI failed

There's a gboolean return for that, and the messages don't really
add anything useful.

---

 gst/dataurisrc/gstdataurisrc.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/gst/dataurisrc/gstdataurisrc.c b/gst/dataurisrc/gstdataurisrc.c
index da91390..04deed9 100644
--- a/gst/dataurisrc/gstdataurisrc.c
+++ b/gst/dataurisrc/gstdataurisrc.c
@@ -410,32 +410,32 @@ gst_data_uri_src_set_uri (GstURIHandler * handler, const gchar * uri)
   gst_caps_unref (caps);
 
   ret = TRUE;
-  GST_OBJECT_UNLOCK (src);
+
 out:
+
+  GST_OBJECT_UNLOCK (src);
+
   g_free (mimetype);
   g_free (charset);
 
-
   return ret;
 
 invalid_uri:
   {
-    GST_OBJECT_UNLOCK (src);
-    GST_ELEMENT_ERROR (src, STREAM, FORMAT, (NULL), (NULL));
+    GST_WARNING_OBJECT (src, "invalid URI '%s'", uri);
+    goto out;
   }
-  goto out;
 wrong_state:
   {
-    GST_OBJECT_UNLOCK (src);
-    GST_ELEMENT_ERROR (src, CORE, FAILED, (NULL), (NULL));
+    GST_WARNING_OBJECT (src, "Can't set URI in %s state",
+        gst_element_state_get_name (GST_STATE (src)));
+    goto out;
   }
-  goto out;
 invalid_uri_encoded_data:
   {
-    GST_OBJECT_UNLOCK (src);
-    GST_ELEMENT_ERROR (src, STREAM, FORMAT, (NULL), (NULL));
+    GST_WARNING_OBJECT (src, "Failed to parse data encoded in URI '%s'", uri);
+    goto out;
   }
-  goto out;
 }
 
 static gboolean





More information about the Gstreamer-commits mailing list