summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
Diffstat (limited to 'src/input')
-rw-r--r--src/input/input_dvd.c9
-rw-r--r--src/input/input_file.c25
2 files changed, 8 insertions, 26 deletions
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c
index 40464c02a..c55ff8726 100644
--- a/src/input/input_dvd.c
+++ b/src/input/input_dvd.c
@@ -1489,12 +1489,14 @@ static int dvd_plugin_open (input_plugin_t *this_gen) {
trace_print("Called\n");
/* we already checked the "dvd:/" MRL before */
- locator = this->mrl + (sizeof("dvd:") - 1);
+ locator = strdup (this->mrl + (sizeof("dvd:") - 1));
/* FIXME: call a generic xine-lib MRL parser here to pre-parse
* the MRL for ?title=<title>&part=<part> stuff and to expand
* escaped characters properly */
-
+
+ _x_mrl_unescape (locator);
+
this->mode = dvd_parse_mrl(this, &locator, &title_part);
if (this->mode == MODE_FAIL) {
@@ -1503,8 +1505,11 @@ static int dvd_plugin_open (input_plugin_t *this_gen) {
_x_message(this->stream, XINE_MSG_READ_ERROR,
/* FIXME: see FIXME in dvd_parse_try_open() */
(strlen(locator) && !(locator[0] == '/' && locator[1] == '\0')) ? locator : class->dvd_device, NULL);
+ free (locator);
return 0;
}
+
+ free (locator);
dvdnav_get_title_string(this->dvdnav, &this->dvd_name);
if(this->dvd_name)
diff --git a/src/input/input_file.c b/src/input/input_file.c
index dd67d06ed..91513194c 100644
--- a/src/input/input_file.c
+++ b/src/input/input_file.c
@@ -327,31 +327,8 @@ static void file_plugin_dispose (input_plugin_t *this_gen ) {
}
static char *decode_uri (char *uri) {
-
- int len = strlen (uri);
- int i;
-
uri = strdup(uri);
-
- for (i=0; i<len; i++) {
-
- if ( (uri[i]=='%') && (i<(len-2)) ) {
-
- int c;
-
- if ( sscanf (&uri[i+1], "%02x", &c) == 1) {
-
- uri[i]= (char) c;
-
- memmove (uri+i+1, uri+i+3, len-i-3);
-
- len-=2;
- }
- }
- }
-
- uri[len] = 0;
-
+ _x_mrl_unescape (uri);
return uri;
}