diff options
author | wm4 <wm4@nowhere> | 2020-02-21 12:05:29 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-02-21 12:05:29 +0100 |
commit | 9f5b9011d6cf917c283b0576af4172b04a21008c (patch) | |
tree | ad45a59b9947109c8fad5767a0fe4ebf170dc00b | |
parent | 3d225ad2755bbc69e3a88c0f5a6c4358baea0e9b (diff) | |
download | mpv-9f5b9011d6cf917c283b0576af4172b04a21008c.tar.bz2 mpv-9f5b9011d6cf917c283b0576af4172b04a21008c.tar.xz |
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.)
-rw-r--r-- | demux/demux_edl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/demux/demux_edl.c b/demux/demux_edl.c index f72aeb2c03..20e5c222e7 100644 --- a/demux/demux_edl.c +++ b/demux/demux_edl.c @@ -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++) { |