[vlc-devel] [PATCH 1/2] ALSA: fix missing channel count assignment

Edward Sheldrake ejsheldrake at gmail.com
Wed Feb 29 20:09:23 CET 2012


In theory this fixes leaving chans uninitialized, but normally this line is
never reached due to defaulting to 2 channels earlier.
---
 modules/audio_output/alsa.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c
index e948efb..bcca085 100644
--- a/modules/audio_output/alsa.c
+++ b/modules/audio_output/alsa.c
@@ -412,7 +412,7 @@ static int Open (vlc_object_t *obj)
         chans = 2;
     /* Out of desperation, try the original channels count. */
     else if (snd_pcm_hw_params_set_channels (pcm, hw, channels) == 0)
-        ;
+        chans = channels;
     /* As last chance, try anything. */
     else
     {
-- 
1.7.9.2




More information about the vlc-devel mailing list