summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-06-16 21:31:13 +0200
committerwm4 <wm4@nowhere>2017-06-16 21:31:24 +0200
commit986e10901dad89eed89ae79d2bc0f1634d1cacbd (patch)
tree20f32a618232c746907d9a9796cced271754df23 /options
parentb7d9b7268680b1f65f73f1d60546570d0693211a (diff)
downloadmpv-986e10901dad89eed89ae79d2bc0f1634d1cacbd.tar.bz2
mpv-986e10901dad89eed89ae79d2bc0f1634d1cacbd.tar.xz
command: avoid going through prop->opt bridge from opt->prop bridge
The option->property bridge can't (and shouldn't) preserve option flags. This is a problem if the flags are actually used by the option implementation, beyond calling m_config_mark_co_flags(). This was true so far, but b8193e40719 changed this. Now setting the --profile option (usually from a config file or as recursive profile) can have side-effects that depend on the flags contents. Solve this by avoiding going through the "double bridge" altogether. This fixes a regression if an auto-profile is active, and the user specifies an option on the command line that is supposed to override an item in a profile recursively referenced by the auto-profile. The command line option will not override it, because the auto-profile is set later, and during application of the auto-profile, the M_SETOPT_PRESERVE_CMDLINE flag gets lost. Having to add something to m_property is not nice, and I'll probbaly regret later. On the other hand, there is a chance that this helps towards true option/property unification.
Diffstat (limited to 'options')
-rw-r--r--options/m_property.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/options/m_property.h b/options/m_property.h
index 9a1e3295dc..0e2d13c7e2 100644
--- a/options/m_property.h
+++ b/options/m_property.h
@@ -132,6 +132,8 @@ struct m_property {
// returns: one of enum mp_property_return
int (*call)(void *ctx, struct m_property *prop, int action, void *arg);
void *priv;
+ // Special-case: mark options for which command.c uses the option-bridge
+ bool is_option;
};
struct m_property *m_property_list_find(const struct m_property *list,