mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
plugins/elements/: Also check for an absolute path following file:// in the filesrc element. Remove redundant check a...
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.
This commit is contained in:
parent
5ee6741827
commit
67a92e45a2
3 changed files with 20 additions and 6 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
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>
|
2007-02-13 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
* docs/design/draft-klass.txt:
|
* docs/design/draft-klass.txt:
|
||||||
|
|
|
@ -554,10 +554,14 @@ gst_file_sink_uri_set_uri (GstURIHandler * handler, const gchar * uri)
|
||||||
* "location" with uri + 16 because it provides unescaping */
|
* "location" with uri + 16 because it provides unescaping */
|
||||||
location = gst_uri_get_location (tmp);
|
location = gst_uri_get_location (tmp);
|
||||||
g_free (tmp);
|
g_free (tmp);
|
||||||
} else if (!g_str_has_prefix (uri, "file:///")) {
|
|
||||||
return FALSE;
|
|
||||||
} else {
|
} else {
|
||||||
location = gst_uri_get_location (uri);
|
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);
|
ret = gst_file_sink_set_location (sink, location);
|
||||||
|
|
|
@ -1074,12 +1074,14 @@ gst_file_src_uri_set_uri (GstURIHandler * handler, const gchar * uri)
|
||||||
* "location" with uri + 16 because it provides unescaping */
|
* "location" with uri + 16 because it provides unescaping */
|
||||||
location = gst_uri_get_location (tmp);
|
location = gst_uri_get_location (tmp);
|
||||||
g_free (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 {
|
} else {
|
||||||
location = gst_uri_get_location (uri);
|
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);
|
ret = gst_file_src_set_location (src, location);
|
||||||
|
|
Loading…
Reference in a new issue