From 3ca9d94c6406c1c25d9605f1e09301521cf1e236 Mon Sep 17 00:00:00 2001 From: ulion Date: Sat, 5 Jan 2008 01:40:36 +0000 Subject: Fix property audio_delay bug when step up/down with arg value NULL. Original patched by Davide Capodaglio . git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25595 b3059339-0415-0410-9bf9-f77b7e298cf2 --- command.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'command.c') diff --git a/command.c b/command.c index 1726c4555f..993838566c 100644 --- a/command.c +++ b/command.c @@ -590,12 +590,12 @@ static int mp_property_audio_delay(m_option_t * prop, int action, switch (action) { case M_PROPERTY_SET: case M_PROPERTY_STEP_UP: - case M_PROPERTY_STEP_DOWN: - if (!arg) - return M_PROPERTY_ERROR; - else { + case M_PROPERTY_STEP_DOWN: { + int ret; float delay = audio_delay; - m_property_delay(prop, action, arg, &audio_delay); + ret = m_property_delay(prop, action, arg, &audio_delay); + if (ret != M_PROPERTY_OK) + return ret; if (mpctx->sh_audio) mpctx->delay -= audio_delay - delay; } -- cgit v1.2.3