[MPlayer-dev-eng] [PATCH] changing audio_delay with OSD menu
Davide Capodaglio
davidecapod at inwind.it
Fri Jan 4 19:43:00 CET 2008
Hi all,
this patch fixes the audio_delay property setting in OSD menu. Currently
this does not work, it is not possible to change the value with STEPUP /
STEPDOWN.
The reason behind this is that arg is NULL for step up/down and so it
should not be checked.
Bye
Davide
--- command.c.orig 2007-10-07 21:49:33.000000000 +0200
+++ command.c 2008-01-04 19:24:34.000000000 +0100
@@ -507,17 +507,16 @@
return M_PROPERTY_UNAVAILABLE;
switch (action) {
case M_PROPERTY_SET:
- case M_PROPERTY_STEP_UP:
- case M_PROPERTY_STEP_DOWN:
if (!arg)
return M_PROPERTY_ERROR;
- else {
- float delay = audio_delay;
- m_property_delay(prop, action, arg, &audio_delay);
- if (mpctx->sh_audio)
- mpctx->delay -= audio_delay - delay;
- }
+ case M_PROPERTY_STEP_UP:
+ case M_PROPERTY_STEP_DOWN: {
+ float delay = audio_delay;
+ m_property_delay(prop, action, arg, &audio_delay);
+ if (mpctx->sh_audio)
+ mpctx->delay -= audio_delay - delay;
return M_PROPERTY_OK;
+ }
default:
return m_property_delay(prop, action, arg, &audio_delay);
}
More information about the MPlayer-dev-eng
mailing list