Commit 0703aa6b authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

lib: fix libvlc_audio_output_device_list_get() crash

Only query the list of audio devices if the specified module/option
exists, and it is a string.

(cherry picked from commit 75781357)
Signed-off-by: Rémi Denis-Courmont's avatarRémi Denis-Courmont <remi@remlab.net>
parent 2d394cec
......@@ -189,6 +189,9 @@ libvlc_audio_output_device_list_get( libvlc_instance_t *p_instance,
>= sizeof(varname) )
return NULL;
if( config_GetType(varname) != VLC_VAR_STRING )
return NULL;
libvlc_audio_output_device_t *list = NULL, **pp = &list;
char **values, **texts;
ssize_t count = config_GetPszChoices( VLC_OBJECT(p_instance->p_libvlc_int),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment