From 19ed98fa0ad31cc198d8f914f34483436d00e626 Mon Sep 17 00:00:00 2001 From: Darren Salt 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(-) 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