From 964ec25cef7d4b61e8134c56691d0ff156d081e3 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sun, 8 Jul 2007 15:19:23 +0100 Subject: Have the file input plugin use _x_mrl_unescape() instead of its own code. --- src/input/input_file.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'src/input') diff --git a/src/input/input_file.c b/src/input/input_file.c index c755a84a8..c0ff41a78 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 Date: Sun, 8 Jul 2007 15:20:02 +0100 Subject: Handle escaped characters in DVD MRLs. --- src/input/input_dvd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/input') diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index de47de0d5..9f8aa6a25 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -1485,12 +1485,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=&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) { @@ -1499,8 +1501,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) -- cgit v1.2.3