diff options
author | wm4 <wm4@nowhere> | 2020-04-09 11:27:38 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-04-09 11:27:38 +0200 |
commit | bc1a18ee245ec2243d4b7b0fa22894f4326b3758 (patch) | |
tree | f8b56c493a058c17bb64ae5b3b77b77003d5d0be /options/m_option.c | |
parent | 823e5205eac66e5bff0953605b5b6c9ddde54739 (diff) | |
download | mpv-bc1a18ee245ec2243d4b7b0fa22894f4326b3758.tar.bz2 mpv-bc1a18ee245ec2243d4b7b0fa22894f4326b3758.tar.xz |
options: cleanup .min use for OPT_CHANNELS
Replace use of .min==1 with a proper flag. This is a good idea, because
it has nothing to do with numeric limits (also see commit 9d32d62b61547
for how this can go wrong).
With this, m_option.min/max are strictly used for numeric limits.
Diffstat (limited to 'options/m_option.c')
-rw-r--r-- | options/m_option.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/options/m_option.c b/options/m_option.c index aa1ac71ae6..51e3c38801 100644 --- a/options/m_option.c +++ b/options/m_option.c @@ -2493,8 +2493,7 @@ const m_option_type_t m_option_type_afmt = { static int parse_channels(struct mp_log *log, const m_option_t *opt, struct bstr name, struct bstr param, void *dst) { - // see OPT_CHANNELS for semantics. - bool limited = opt->min; + bool limited = opt->flags & M_OPT_CHANNELS_LIMITED; struct m_channels res = {0}; |