From ef74d21b1f1d96b2e3f180c021998fbdd80ffcba Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Mon, 21 Apr 2008 05:18:40 +0300 Subject: Move loop_times to option struct --- command.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'command.c') diff --git a/command.c b/command.c index 929f52b757..c5c3204d27 100644 --- a/command.c +++ b/command.c @@ -177,18 +177,19 @@ static int mp_property_osdlevel(m_option_t * prop, int action, void *arg, static int mp_property_loop(m_option_t * prop, int action, void *arg, MPContext * mpctx) { + struct MPOpts *opts = &mpctx->opts; switch (action) { case M_PROPERTY_PRINT: if (!arg) return M_PROPERTY_ERROR; - if (mpctx->loop_times < 0) + if (opts->loop_times < 0) *(char**)arg = strdup("off"); - else if (mpctx->loop_times == 0) + else if (opts->loop_times == 0) *(char**)arg = strdup("inf"); else break; return M_PROPERTY_OK; } - return m_property_int_range(prop, action, arg, &mpctx->loop_times); + return m_property_int_range(prop, action, arg, &opts->loop_times); } /// Playback speed (RW) -- cgit v1.2.3