summaryrefslogtreecommitdiffstats
path: root/mpvcore
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-01 12:27:04 +0100
committerwm4 <wm4@nowhere>2013-11-01 12:27:04 +0100
commit2696148d64364b40e7b0d1d3de017d6afce4b43d (patch)
treed0552000e36f41413d0f99aa88b8aaf59a48ec46 /mpvcore
parent482009d17039854174c74731c04c27f93d355ae0 (diff)
downloadmpv-2696148d64364b40e7b0d1d3de017d6afce4b43d.tar.bz2
mpv-2696148d64364b40e7b0d1d3de017d6afce4b43d.tar.xz
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.c4
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++;
}