summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-07-13 16:10:03 +0200
committerwm4 <wm4@nowhere>2019-09-19 20:37:05 +0200
commitae797a21ec3ad0f5071911acf99efc56572d4fa3 (patch)
tree1ec9610ea867babb7f32bd47a7c8151d907d34dd /player/command.c
parent2f5dbaa8320ac1497cd3a77867ac8826ca3fd3c2 (diff)
downloadmpv-ae797a21ec3ad0f5071911acf99efc56572d4fa3.tar.bz2
mpv-ae797a21ec3ad0f5071911acf99efc56572d4fa3.tar.xz
command: don't add deprecated CLI aliases to property list
A dumb thing that the cursed property-option bridge accidentally did. Normal deprecated options on the other hand are fine in the property list, because they're wanted for compatibility.
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c
index 8c4f8de5ea..e5d72e5b39 100644
--- a/player/command.c
+++ b/player/command.c
@@ -6059,6 +6059,18 @@ void command_init(struct MPContext *mpctx)
prop.call = co->opt->deprecation_message ?
mp_property_deprecated_alias : mp_property_alias;
+
+ // Check whether this eventually arrives at a real option. If not,
+ // it's some CLI special handling thing. For example, "nosound" is
+ // mapped to "no-audio", which has CLI special-handling, and cannot
+ // be set as property.
+ struct m_config_option *co2 = co;
+ while (co2 && co2->opt->type == &m_option_type_alias) {
+ const char *alias = (const char *)co2->opt->priv;
+ co2 = m_config_get_co_raw(mpctx->mconfig, bstr0(alias));
+ }
+ if (!co2)
+ continue;
}
// The option might be covered by a manual property already.