vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Mon Mar 16 20:04:33 2015 +0200| [45db0215add18231b00e3ebdf7762a0e68da5b2a] | committer: Rémi Denis-Courmont
ALSA: log the device string that is actually opened > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=45db0215add18231b00e3ebdf7762a0e68da5b2a --- modules/audio_output/alsa.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c index 9e0fe10..fd40d85 100644 --- a/modules/audio_output/alsa.c +++ b/modules/audio_output/alsa.c @@ -382,20 +382,21 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt) const int mode = SND_PCM_NO_AUTO_RESAMPLE; int val = snd_pcm_open (&pcm, device, SND_PCM_STREAM_PLAYBACK, mode); - free (devbuf); if (val != 0) { - msg_Err (aout, "cannot open ALSA device \"%s\": %s", sys->device, + msg_Err (aout, "cannot open ALSA device \"%s\": %s", device, snd_strerror (val)); dialog_Fatal (aout, _("Audio output failed"), _("The audio device \"%s\" could not be used:\n%s."), sys->device, snd_strerror (val)); + free (devbuf); return VLC_EGENERIC; } sys->pcm = pcm; /* Print some potentially useful debug */ - msg_Dbg (aout, "using ALSA device: %s", sys->device); + msg_Dbg (aout, "using ALSA device: %s", device); + free (devbuf); DumpDevice (VLC_OBJECT(aout), pcm); /* Get Initial hardware parameters */ _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
