demux_edl: correct warning on duplicate parameters

A parameter that is actually used is removed from the param_names[]
array, so we can report unused parameters. This also happened on
duplicate parameters, so adjust the warning to make it less confusing.

(In any case, you're not supposed to provide duplicate parameters.)
This commit is contained in:
wm4 2020-02-21 12:05:29 +01:00
parent 3d225ad275
commit 9f5b9011d6
1 changed files with 4 additions and 2 deletions

View File

@ -292,8 +292,10 @@ static struct tl_root *parse_edl(bstr str, struct mp_log *log)
}
if (ctx.error)
goto error;
for (int n = 0; n < ctx.num_params; n++)
mp_warn(log, "Unknown parameter: '%.*s'\n", BSTR_P(ctx.param_names[n]));
for (int n = 0; n < ctx.num_params; n++) {
mp_warn(log, "Unknown or duplicate parameter: '%.*s'\n",
BSTR_P(ctx.param_names[n]));
}
}
assert(root->num_pars);
for (int n = 0; n < root->num_pars; n++) {