Page 1 of 1

CTRL+L shortcut crashes videolan on startup

Posted: 20 Oct 2005 17:53
by mdomi
Hi!

The shortcuts are grayed in the menu (thus
not accessible) but are/seems not disabled.

As an example :
1/ start VideoLAN
2/ hit CTRL+L
3/ segfault

Tested on 8.2 and 8.4-test1a

Thanks
--
Dominique M.

PS: meuuh meuuh

Posted: 20 Oct 2005 21:00
by brian
A bit more info...

It seems to crash in the libhotkeys_plugin and CTRL+K also crashes...

CTRL+K = audio delay up
CTRL+L = audio delay down

CTRL+H crashes it too...

I believe the fix is in control/hotkeys.c

To change: (Line 352...)

Code: Select all

else if( i_action == ACTIONID_AUDIODELAY_DOWN ) { int64_t i_delay = var_GetTime( p_input, "audio-delay" ); i_delay -= 50000; /* 50 ms */ var_SetTime( p_input, "audio-delay", i_delay ); ClearChannels( p_intf, p_vout ); vout_OSDMessage( p_intf, DEFAULT_CHAN, "Audio delay %i ms", (int)(i_delay/1000) ); }
To:

Code: Select all

else if( i_action == ACTIONID_AUDIODELAY_DOWN ) { if (p_vout) { int64_t i_delay = var_GetTime( p_input, "audio-delay" ); i_delay -= 50000; /* 50 ms */ var_SetTime( p_input, "audio-delay", i_delay ); ClearChannels( p_intf, p_vout ); vout_OSDMessage( p_intf, DEFAULT_CHAN, "Audio delay %i ms", (int)(i_delay/1000) ); } }

i.e. check for p_vout == NULL before using p_vout...

The same fix would go for:
else if( i_action == ACTIONID_AUDIODELAY_UP ) // key K
and:
else if( i_action == ACTIONID_AUDIODELAY_DOWN ) // key L
and:
else if( i_action == ACTIONID_SUBDELAY_DOWN ) // key H
And:
else if( i_action == ACTIONID_SUBDELAY_UP ) // key J

:)

Posted: 22 Oct 2005 12:19
by AsMaX
In fact the check has to be done on p_input. I've fixed it, thanks for reporting.