[gstreamer-bugs] [Bug 469402] New: false file uri on windows
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Wed Aug 22 14:50:17 PDT 2007
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
http://bugzilla.gnome.org/show_bug.cgi?id=469402
GStreamer | gstreamer (core) | Ver: 0.10.13
Summary: false file uri on windows
Product: GStreamer
Version: 0.10.13
Platform: Other
OS/Version: Windows
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gstreamer (core)
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: samuelv at users.sourceforge.net
QAContact: gstreamer-bugs at lists.sourceforge.net
GNOME version: Unspecified
GNOME milestone: Unspecified
When you use gst-app (from cvs repository) or when you use gst-launch like this
:
gst-launch playbin uri=file:///c:/film.avi
you obtained this messages (on msdos and msys):
FAILED to play file:///g:/film.avi: Could not open file "/g:/film.avi" for
reading.
E:\devel-release\src_releases\gstreamer\plugins\elements\gstfilesrc.c(981):
(function) (): /playbin/source:
system error: Invalid argument
Effectively, /c:/path doesn't exist on windows.
To correct this bug, I propose following patch in gst/gsturi.c.
Function uses g_filename_from_uri from glib and the result will be fine on all
platforms.
Perhaps, else case does not necessary.
Samuel
gchar *
gst_uri_get_location (const gchar * uri)
{
gchar *colon;
gchar *location, *unescaped;
GError *err = NULL;
g_return_val_if_fail (uri != NULL, NULL);
g_return_val_if_fail (gst_uri_is_valid (uri), NULL);
if (gst_uri_has_protocol(uri, "file") == TRUE)
{
unescaped = g_filename_from_uri(uri, NULL, &err);
if (err != NULL)
{
GST_WARNING ("Failed to convert URI to a local filename: %s",
err->message);
g_error_free(err);
}
}
else
{
colon = strstr (uri, "://");
location = g_strdup (colon + 3);
unescaped = unescape_string (location, "/");
g_free (location);
}
return unescaped;
}
--
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=469402.
More information about the Gstreamer-bugs
mailing list