diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/input/vcd/xineplug_inp_vcd.c | 27 |
2 files changed, 19 insertions, 10 deletions
@@ -11,7 +11,7 @@ xine-lib (1.1.8) (Unreleased) * Various build fixes and cleanups for Solaris, plugin dependencies etc. * Fix some memory leaks in the Vorbis decoder and video overlays. * Fix a problem with the goom plugin which could cause it to stop working. - * Clean up "%" unescaping in MRLs; correctly handle "%" in DVD MRLs. + * Clean up "%" unescaping in MRLs; correctly handle "%" in DVD and VCD MRLs. * Fix a crash with "dvb:/". * DVB subtitle fixes: deadlock prevention, thread leakage, spec compliance. * Allow the DVB input plugin to timeout if it is receiving no signal. diff --git a/src/input/vcd/xineplug_inp_vcd.c b/src/input/vcd/xineplug_inp_vcd.c index 9eb9ac996..795a2480d 100644 --- a/src/input/vcd/xineplug_inp_vcd.c +++ b/src/input/vcd/xineplug_inp_vcd.c @@ -502,14 +502,16 @@ vcd_parse_mrl(/*in*/ const char *default_vcd_device, /*in*/ char *mrl, itemid->type = (vcdinfo_item_enum_t) auto_type; *used_default = false; - if ( NULL != mrl && !strncasecmp(mrl, MRL_PREFIX, MRL_PREFIX_LEN) ) - p = &mrl[MRL_PREFIX_LEN]; - else { + if ( NULL == mrl || strncasecmp(mrl, MRL_PREFIX, MRL_PREFIX_LEN) ) return false; - } - - count = sscanf (p, "%1024[^@]@%1[EePpSsTt]%u", - device_str, type_str, &num); + p = &mrl[MRL_PREFIX_LEN - 2]; + while (*p == '/') + ++p; + + device_str[0] = '/'; + device_str[1] = 0; + count = sscanf (p, "%1023[^@]@%1[EePpSsTt]%u", + device_str + 1, type_str, &num); itemid->num = num; switch (count) { @@ -522,11 +524,18 @@ vcd_parse_mrl(/*in*/ const char *default_vcd_device, /*in*/ char *mrl, itemid->num = num; if (1==count) { type_str[0] = 'T'; + if (default_vcd_device) + strncpy(device_str, default_vcd_device, MAX_DEVICE_LEN); + else + *device_str = 0; } - + else + _x_mrl_unescape (device_str); break; } - + case 2 ... 9: + _x_mrl_unescape (device_str); + case 0: case EOF: { |