[vlc-commits] Waveout: Fix SPDIF output

Andy Tather git at videolan.org
Thu Dec 5 18:35:06 CET 2013


vlc/vlc-2.1 | branch: master | Andy Tather <andy at andytather.co.uk> | Thu Dec  5 18:32:38 2013 +0100| [2052b46a2dbeba97a2da1fe1b36060c173fa31ce] | committer: Jean-Baptiste Kempf

Waveout: Fix SPDIF output

Ref #9522

(cherry picked from commit 4fcfd8479f462ca964bdb061b55b0d4cdfb055b0)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/audio_output/waveout.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/audio_output/waveout.c b/modules/audio_output/waveout.c
index 13c0f1e..f06c8ee 100644
--- a/modules/audio_output/waveout.c
+++ b/modules/audio_output/waveout.c
@@ -178,12 +178,6 @@ static int Start( audio_output_t *p_aout, audio_sample_format_t *restrict fmt )
     /* Default behaviour is to use software gain */
     p_aout->sys->b_soft = true;
 
-    /*
-      check for configured audio device!
-    */
-    fmt->i_format = var_InheritBool( p_aout, "waveout-float32" )?
-        VLC_CODEC_FL32: VLC_CODEC_S16N;
-
     char *dev = var_GetNonEmptyString( p_aout, "waveout-audio-device");
     uint32_t devid = findDeviceID( dev );
 
@@ -233,6 +227,12 @@ static int Start( audio_output_t *p_aout, audio_sample_format_t *restrict fmt )
 
     if( fmt->i_format != VLC_CODEC_SPDIFL )
     {
+       /*
+         check for configured audio device!
+       */
+       fmt->i_format = var_InheritBool( p_aout, "waveout-float32" )?
+           VLC_CODEC_FL32: VLC_CODEC_S16N;
+
         int max_chan = var_InheritInteger( p_aout, "waveout-audio-channels");
         int i_channels = aout_FormatNbChannels(fmt);
         i_channels = ( i_channels < max_chan )? i_channels: max_chan;



More information about the vlc-commits mailing list