Fix property audio_delay bug when step up/down with arg value NULL.

Original patched by Davide Capodaglio <davidecapod A inwind P it>.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25595 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
ulion 2008-01-05 01:40:36 +00:00
parent 9c85a5f17c
commit 3ca9d94c64
1 changed files with 5 additions and 5 deletions

View File

@ -590,12 +590,12 @@ static int mp_property_audio_delay(m_option_t * prop, int action,
switch (action) { switch (action) {
case M_PROPERTY_SET: case M_PROPERTY_SET:
case M_PROPERTY_STEP_UP: case M_PROPERTY_STEP_UP:
case M_PROPERTY_STEP_DOWN: case M_PROPERTY_STEP_DOWN: {
if (!arg) int ret;
return M_PROPERTY_ERROR;
else {
float delay = audio_delay; 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) if (mpctx->sh_audio)
mpctx->delay -= audio_delay - delay; mpctx->delay -= audio_delay - delay;
} }