diff options
author | wm4 <wm4@nowhere> | 2013-11-01 12:27:04 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-01 12:27:04 +0100 |
commit | 2696148d64364b40e7b0d1d3de017d6afce4b43d (patch) | |
tree | d0552000e36f41413d0f99aa88b8aaf59a48ec46 /mpvcore | |
parent | 482009d17039854174c74731c04c27f93d355ae0 (diff) |
options: fix positional suboption asrguments
E.g. "-vf scale=848:480" set the w argument twice, instead of setting w
and then h.
This was caused by accidental shadowing of a local variable.
Regression since probably 4cd143e.
Diffstat (limited to 'mpvcore')
-rw-r--r-- | mpvcore/m_config.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mpvcore/m_config.c b/mpvcore/m_config.c index 463fc8e6f7..a938eb843b 100644 --- a/mpvcore/m_config.c +++ b/mpvcore/m_config.c @@ -461,13 +461,13 @@ struct m_config_option *m_config_get_co(const struct m_config *config, return NULL; } -const char *m_config_get_positional_option(const struct m_config *config, int n) +const char *m_config_get_positional_option(const struct m_config *config, int p) { int pos = 0; for (int n = 0; n < config->num_opts; n++) { struct m_config_option *co = &config->opts[n]; if (!co->is_generated) { - if (pos == n) + if (pos == p) return co->name; pos++; } |