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

ALSA: use default device if none specified instead of failing

parent 063bfc5c
...@@ -345,14 +345,15 @@ static int Open( vlc_object_t *p_this ) ...@@ -345,14 +345,15 @@ static int Open( vlc_object_t *p_this )
return VLC_ENOMEM; return VLC_ENOMEM;
/* Get device name */ /* Get device name */
if( (psz_device = var_InheritString( p_aout, "alsa-audio-device" )) == NULL ) psz_device = var_InheritString( p_aout, "alsa-audio-device" );
if( unlikely(psz_device == NULL) )
{ {
msg_Err( p_aout, "no audio device given (maybe \"default\" ?)" ); psz_device = strdup( DEFAULT_ALSA_DEVICE );
dialog_Fatal( p_aout, _("No Audio Device"), "%s", if( unlikely(psz_device == NULL) )
_("No audio device name was given. You might want to " \ {
"enter \"default\".") ); free( p_sys );
free( p_sys ); return VLC_ENOMEM;
return VLC_EGENERIC; }
} }
/* Choose the IEC device for S/PDIF output: /* Choose the IEC device for S/PDIF output:
......
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