avutil/avstring: fix hardcoded separator in av_match_list()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-10-23 12:22:21 +02:00
parent 3c0b98dced
commit 2de9c5ed98
1 changed files with 4 additions and 4 deletions

View File

@ -409,13 +409,13 @@ int av_match_list(const char *name, const char *list, char separator)
for (p = name; p && *p; ) {
for (q = list; q && *q; ) {
int k;
for (k = 0; p[k] == q[k] || (p[k]*q[k] == 0 && p[k]+q[k] == ','); k++)
if (k && (!p[k] || p[k] == ','))
for (k = 0; p[k] == q[k] || (p[k]*q[k] == 0 && p[k]+q[k] == separator); k++)
if (k && (!p[k] || p[k] == separator))
return 1;
q = strchr(q, ',');
q = strchr(q, separator);
q += !!q;
}
p = strchr(p, ',');
p = strchr(p, separator);
p += !!p;
}