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.
This commit is contained in:
wm4 2013-11-01 12:27:04 +01:00
parent 482009d170
commit 2696148d64
1 changed files with 2 additions and 2 deletions

View File

@ -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++;
}