summaryrefslogtreecommitdiffstats
path: root/packages/gstreamer/gstreamer/filesrc-uri.patch
blob: 0bde73d97044cdfb8890a66c684fc917ad13ac1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Index: gst/elements/gstfilesrc.c
===================================================================
RCS file: /cvs/gstreamer/gstreamer/gst/elements/gstfilesrc.c,v
retrieving revision 1.108.4.3
diff -u -r1.108.4.3 gstfilesrc.c
--- gstreamer.orig/gst/elements/gstfilesrc.c	3 Jun 2005 09:29:31 -0000	1.108.4.3
+++ gstreamer/gst/elements/gstfilesrc.c	12 Aug 2005 11:54:38 -0000
@@ -306,7 +306,13 @@
     src->filename = NULL;
     src->uri = NULL;
   } else {
-    src->filename = g_strdup (location);
+    const gchar *file_prefix = "file://";
+
+    if (g_str_has_prefix (location, file_prefix)) {
+      src->filename = g_strdup (location + strlen (file_prefix));
+    } else {
+      src->filename = g_strdup (location);
+    }
     src->uri = gst_uri_construct ("file", src->filename);
   }
   g_object_notify (G_OBJECT (src), "location");