diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-05-07 16:01:57 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-05-12 09:02:45 +0200 |
commit | d20e695a0040bdfa166338a3c52c6329a4e4387f (patch) | |
tree | 0293bd8a723de7332ead942285e6dba2462c1a36 /plugins | |
parent | 99341f710c489dfdf42f4e2de48144823ffd5a93 (diff) |
filesrc: Improve debugging a bit on invalid URIs
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/elements/gstfilesrc.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c index caa2ef7521..84219f25c0 100644 --- a/plugins/elements/gstfilesrc.c +++ b/plugins/elements/gstfilesrc.c @@ -1132,6 +1132,7 @@ gst_file_src_uri_set_uri (GstURIHandler * handler, const gchar * uri) gchar *location, *hostname = NULL; gboolean ret = FALSE; GstFileSrc *src = GST_FILE_SRC (handler); + GError *error = NULL; if (strcmp (uri, "file://") == 0) { /* Special case for "file://" as this is used by some applications @@ -1141,10 +1142,16 @@ gst_file_src_uri_set_uri (GstURIHandler * handler, const gchar * uri) return TRUE; } - location = g_filename_from_uri (uri, &hostname, NULL); + location = g_filename_from_uri (uri, &hostname, &error); - if (!location) { - GST_WARNING_OBJECT (src, "Invalid URI '%s' for filesrc", uri); + if (!location || error) { + if (error) { + GST_WARNING_OBJECT (src, "Invalid URI '%s' for filesrc: %s", uri, + error->message); + g_error_free (error); + } else { + GST_WARNING_OBJECT (src, "Invalid URI '%s' for filesrc", uri); + } goto beach; } |