From 9d32d62b6154784a4e38dcb0ff50b8331e9169bf Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 9 Apr 2020 11:08:03 +0200 Subject: options: fix ab-loop-* properties These used ".min = MP_NOPTS_VALUE" to indicate certain exceptions. This broke with the recent change to how min/max are handled, which made setting min or max mean that a value range is used, thus setting max=0. Fix this by not using magic a value in .min; replace it with a proper flag. Fixes: #7596 --- options/m_option.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'options/m_option.c') diff --git a/options/m_option.c b/options/m_option.c index a7b02b8819..fcc52406ff 100644 --- a/options/m_option.c +++ b/options/m_option.c @@ -2639,7 +2639,7 @@ static int parse_timestring(struct bstr str, double *time, char endchar) return len; } -#define HAS_NOPTS(opt) ((opt)->min == MP_NOPTS_VALUE) +#define HAS_NOPTS(opt) ((opt)->flags & M_OPT_ALLOW_NO) static int parse_time(struct mp_log *log, const m_option_t *opt, struct bstr name, struct bstr param, void *dst) -- cgit v1.2.3