summaryrefslogtreecommitdiffstats
path: root/options/m_option.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-04-09 11:08:03 +0200
committerwm4 <wm4@nowhere>2020-04-09 11:13:38 +0200
commit9d32d62b6154784a4e38dcb0ff50b8331e9169bf (patch)
treef2507d768e02fadc312e9ccc53765527b3d992c9 /options/m_option.c
parenta67bda28409dd893617ef47f6e089fd753d7de78 (diff)
downloadmpv-9d32d62b6154784a4e38dcb0ff50b8331e9169bf.tar.bz2
mpv-9d32d62b6154784a4e38dcb0ff50b8331e9169bf.tar.xz
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
Diffstat (limited to 'options/m_option.c')
-rw-r--r--options/m_option.c2
1 files changed, 1 insertions, 1 deletions
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)