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

ALSA: do not insist if the device string is empty, just fail

Either we are out of memory, or someone really did not want ALSA.
parent 64785761
...@@ -328,12 +328,8 @@ static int Open( vlc_object_t *p_this ) ...@@ -328,12 +328,8 @@ static int Open( vlc_object_t *p_this )
char *psz_device = var_InheritString( p_aout, "alsa-audio-device" ); char *psz_device = var_InheritString( p_aout, "alsa-audio-device" );
if( unlikely(psz_device == NULL) ) if( unlikely(psz_device == NULL) )
{ {
psz_device = strdup( DEFAULT_ALSA_DEVICE ); free( p_sys );
if( unlikely(psz_device == NULL) ) return VLC_EGENERIC;
{
free( p_sys );
return VLC_ENOMEM;
}
} }
/* 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