summaryrefslogtreecommitdiffstats
path: root/m_option.c
diff options
context:
space:
mode:
Diffstat (limited to 'm_option.c')
-rw-r--r--m_option.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/m_option.c b/m_option.c
index 996806fe39..2814e5dcdf 100644
--- a/m_option.c
+++ b/m_option.c
@@ -1204,10 +1204,12 @@ static double parse_timestring(char *str)
static int parse_time(m_option_t* opt,char *name, char *param, void* dst, int src)
{
+ double time;
+
if (param == NULL || strlen(param) == 0)
return M_OPT_MISSING_PARAM;
- double time = parse_timestring(param);
+ time = parse_timestring(param);
if (time == -1e100) {
mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Option %s: invalid time: '%s'\n",
name,param);