Commit 246951cc authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

var_LocationParse(): accept semicolon as separator

This is for backward compatibility with existing VLC playlists and
VLC playlist generators.
(cherry picked from commit cb9a583c)
parent 8d6ca0d7
......@@ -1091,8 +1091,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
......@@ -1112,9 +1114,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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment