summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2007-07-08 15:20:02 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2007-07-08 15:20:02 +0100
commit19ed98fa0ad31cc198d8f914f34483436d00e626 (patch)
treeef287c4de4bdf2f424a01d844d5afa507c2fa4d1
parent964ec25cef7d4b61e8134c56691d0ff156d081e3 (diff)
downloadxine-lib-19ed98fa0ad31cc198d8f914f34483436d00e626.tar.gz
xine-lib-19ed98fa0ad31cc198d8f914f34483436d00e626.tar.bz2
Handle escaped characters in DVD MRLs.
-rw-r--r--src/input/input_dvd.c9
1 files changed, 7 insertions, 2 deletions
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=<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)