Original commit message from CVS:
* plugins/elements/gstfilesink.c: (gst_file_sink_uri_set_uri):
* plugins/elements/gstfilesrc.c: (gst_file_src_uri_set_uri):
Also check for an absolute path following file:// in the filesrc
element. Remove redundant check and call g_path_is_absolute() on the
unescaped location.
+2007-02-13 Sebastian Dröge <slomo@circular-chaos.org>
+
+ * plugins/elements/gstfilesink.c: (gst_file_sink_uri_set_uri):
+ * plugins/elements/gstfilesrc.c: (gst_file_src_uri_set_uri):
+ Also check for an absolute path following file:// in the filesrc
+ element. Remove redundant check and call g_path_is_absolute() on the
+ unescaped location.
+
2007-02-13 Stefan Kost <ensonic@users.sf.net>
* docs/design/draft-klass.txt:
* "location" with uri + 16 because it provides unescaping */
location = gst_uri_get_location (tmp);
g_free (tmp);
- } else if (!g_str_has_prefix (uri, "file:///")) {
- return FALSE;
} else {
location = gst_uri_get_location (uri);
+ if (!location)
+ return FALSE;
+ if (!g_path_is_absolute (location)) {
+ g_free (location);
+ return FALSE;
+ }
}
ret = gst_file_sink_set_location (sink, location);
* "location" with uri + 16 because it provides unescaping */
location = gst_uri_get_location (tmp);
g_free (tmp);
- } else if (!g_str_has_prefix (uri, "file://")) {
- return FALSE;
- } else if (!g_path_is_absolute (uri + strlen ("file://"))) {
- return FALSE;
} else {
location = gst_uri_get_location (uri);
+ if (!location)
+ return FALSE;
+ if (!g_path_is_absolute (location)) {
+ g_free (location);
+ return FALSE;
+ }
}
ret = gst_file_src_set_location (src, location);