[vlc-commits] var_LocationParse(): accept semicolon as separated

Rémi Denis-Courmont git at videolan.org
Tue Aug 21 16:00:41 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Aug 21 16:59:42 2012 +0300| [2cad60712146492ed02f2d506ca2a9b41b2174d9] | committer: Rémi Denis-Courmont

var_LocationParse(): accept semicolon as separated

This is for backward compatibility with existing VLC playlists and
VLC playlist generators.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2cad60712146492ed02f2d506ca2a9b41b2174d9
---

 src/misc/variables.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/misc/variables.c b/src/misc/variables.c
index 011fb2d..1aec092 100644
--- a/src/misc/variables.c
+++ b/src/misc/variables.c
@@ -1083,8 +1083,10 @@ cleanup:
 
 #undef var_LocationParse
 /**
- * Parses a set of colon-separated <variable name>=<value> pairs. Some access
- * (or access_demux) plugins uses this scheme in media resource location.
+ * Parses a set of colon-separated or semicolon-separated
+ * <variable name>=<value> pairs.
+ * Some access (or access_demux) plugins uses this scheme
+ * in media resource location.
  * @note Only trusted/safe variables are allowed. This is intended.
  *
  * @warning Only use this for plugins implementing VLC-specific resource
@@ -1104,9 +1106,9 @@ int var_LocationParse (vlc_object_t *obj, const char *mrl, const char *pref)
     assert(mrl != NULL);
     while (*mrl != '\0')
     {
-        mrl += strspn (mrl, ":"); /* skip leading colon(s) */
+        mrl += strspn (mrl, ":;"); /* skip leading colon(s) */
 
-        size_t len = strcspn (mrl, ":");
+        size_t len = strcspn (mrl, ":;");
         char *buf = malloc (preflen + len);
 
         if (likely(buf != NULL))



More information about the vlc-commits mailing list