From 26a173f40c460bb642108d9fffd1255fe3f37520 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 12 Jun 2017 20:13:18 +0200 Subject: m_option: revert commit 2793a70e0fb3 --- options/m_option.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/options/m_option.c b/options/m_option.c index 87e6eead36..cdabfe65a9 100644 --- a/options/m_option.c +++ b/options/m_option.c @@ -2296,13 +2296,12 @@ static int parse_timestring(struct bstr str, double *time, char endchar) static int parse_time(struct mp_log *log, const m_option_t *opt, struct bstr name, struct bstr param, void *dst) { - double time; - if (param.len == 0) return M_OPT_MISSING_PARAM; + double time = MP_NOPTS_VALUE; if (HAS_NOPTS(opt) && bstr_equals0(param, "no")) { - time = MP_NOPTS_VALUE; + // nothing } else if (!parse_timestring(param, &time, 0)) { mp_err(log, "Option %.*s: invalid time: '%.*s'\n", BSTR_P(name), BSTR_P(param)); -- cgit v1.2.3