diff options
author | Michael Roitzsch <mroi@users.sourceforge.net> | 2002-11-01 17:51:57 +0000 |
---|---|---|
committer | Michael Roitzsch <mroi@users.sourceforge.net> | 2002-11-01 17:51:57 +0000 |
commit | 74b5765b92981e87938a11b281b366422606d8b1 (patch) | |
tree | eb4b6a77ead065083a5a5363d4cbcd1c53d1a660 | |
parent | 1c97f04c7a1a6b1dbab373bc9b781eb5f35b9d12 (diff) | |
download | xine-lib-74b5765b92981e87938a11b281b366422606d8b1.tar.gz xine-lib-74b5765b92981e87938a11b281b366422606d8b1.tar.bz2 |
be less strict with MRL syntax, people are used to ://
CVS patchset: 3128
CVS date: 2002/11/01 17:51:57
-rw-r--r-- | src/input/input_cda.c | 3 | ||||
-rw-r--r-- | src/input/input_dvd.c | 22 | ||||
-rw-r--r-- | src/input/input_vcd.c | 3 |
3 files changed, 17 insertions, 11 deletions
diff --git a/src/input/input_cda.c b/src/input/input_cda.c index e7dca01dc..7eaae43a9 100644 --- a/src/input/input_cda.c +++ b/src/input/input_cda.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_cda.c,v 1.36 2002/10/31 17:00:44 mroi Exp $ + * $Id: input_cda.c,v 1.37 2002/11/01 17:51:57 mroi Exp $ */ #ifdef HAVE_CONFIG_H @@ -1397,6 +1397,7 @@ static int cda_plugin_open (input_plugin_t *this_gen, const char *mrl) { } filename = (char *) &this->mrl[5]; + while (*filename == '/') filename++; if(sscanf(filename, "%d", &this->cda->cur_track) != 1) { LOG_MSG_STDERR(this->xine, _("input_cda: malformed MRL. Use cda:/<track #>\n")); diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index 067d233d9..d6f058588 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_dvd.c,v 1.109 2002/11/01 11:48:59 tmattern Exp $ + * $Id: input_dvd.c,v 1.110 2002/11/01 17:51:57 mroi Exp $ * */ @@ -1198,7 +1198,7 @@ static input_plugin_t *open_plugin (input_class_t *class_gen, xine_stream_t *str dvd_input_plugin_t *this; dvd_input_class_t *class = (dvd_input_class_t*)class_gen; char *locator; - int slash_point; + int dot_point; dvdnav_status_t ret; char *intended_dvd_device; xine_cfg_entry_t region_entry, lang_entry, cache_entry; @@ -1252,19 +1252,20 @@ static input_plugin_t *open_plugin (input_class_t *class_gen, xine_stream_t *str this->dvd_name_length = 0; /* Check we can handle this MRL */ - if (!strncasecmp (this->mrl, "dvd:/",5)) + if (!strncasecmp (this->mrl, "dvd:/",5)) { locator = &this->mrl[5]; - else { + while (*locator == '/') locator++; + } else { return 0; } /* Attempt to parse MRL */ - slash_point=0; - while((locator[slash_point] != '\0') && (locator[slash_point] != '/')) { - slash_point++; + dot_point=0; + while((locator[dot_point] != '\0') && (locator[dot_point] != '.')) { + dot_point++; } - if(locator[slash_point] == '/') { + if(locator[dot_point] == '.') { this->mode = MODE_TITLE; } else { this->mode = MODE_NAVIGATE; @@ -1378,7 +1379,7 @@ static input_plugin_t *open_plugin (input_class_t *class_gen, xine_stream_t *str int titles; /* A program and/or VTS was specified */ - locator += slash_point + 1; + locator += dot_point + 1; if(locator[0] == '\0') { /* Empty specifier */ @@ -1668,6 +1669,9 @@ static void *init_class (xine_t *xine, void *data) { /* * $Log: input_dvd.c,v $ + * Revision 1.110 2002/11/01 17:51:57 mroi + * be less strict with MRL syntax, people are used to :// + * * Revision 1.109 2002/11/01 11:48:59 tmattern * Time for fast navigation now ! * diff --git a/src/input/input_vcd.c b/src/input/input_vcd.c index 153794773..f13a67182 100644 --- a/src/input/input_vcd.c +++ b/src/input/input_vcd.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_vcd.c,v 1.54 2002/10/31 17:00:53 mroi Exp $ + * $Id: input_vcd.c,v 1.55 2002/11/01 17:51:58 mroi Exp $ * */ @@ -364,6 +364,7 @@ static int vcd_plugin_open (input_plugin_t *this_gen, const char *mrl) { } filename = (char *) &this->mrl[5]; + while (*filename == '/') filename++; if (sscanf (filename, "%d", &this->cur_track) != 1) { LOG_MSG_STDERR(this->xine, _("input_vcd: malformed MRL. Use vcd:/<track #>\n")); |