[vlc-commits] ALSA: fix S/PDIF output (hopefully)

Rémi Denis-Courmont git at videolan.org
Sat Mar 3 19:18:40 CET 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Mar  3 20:00:44 2012 +0200| [ea6e934aedda48cc024c4554cd33542ee83ab8e4] | committer: Rémi Denis-Courmont

ALSA: fix S/PDIF output (hopefully)

Do not clobber the output format channels to stereo. This would break
the VLC filtering pipeline.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ea6e934aedda48cc024c4554cd33542ee83ab8e4
---

 modules/audio_output/alsa.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c
index e948efb..8a6edd6 100644
--- a/modules/audio_output/alsa.c
+++ b/modules/audio_output/alsa.c
@@ -553,8 +553,6 @@ static int Open (vlc_object_t *obj)
     /* Setup audio_output_t */
     aout->format.i_format = fourcc;
     aout->format.i_rate = rate;
-    aout->format.i_original_channels =
-    aout->format.i_physical_channels = chans;
     if (spdif)
     {
         aout->format.i_bytes_per_frame = AOUT_SPDIF_SIZE;
@@ -562,7 +560,11 @@ static int Open (vlc_object_t *obj)
         aout_VolumeNoneInit (aout);
     }
     else
+    {
+        aout->format.i_original_channels =
+        aout->format.i_physical_channels = chans;
         aout_VolumeSoftInit (aout);
+    }
 
     aout->pf_play = Play;
     if (snd_pcm_hw_params_can_pause (hw))



More information about the vlc-commits mailing list