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
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;
}