Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
22590583 by Zhao Zhili at 2022-06-26T05:37:06+00:00
wasapi: fix no audio output due to invalid i_physical_channels

Regression from 8a1f453f3f9560fd8c61c5b7fddeb8d9e5d5c95b.

- - - - -


1 changed file:

- modules/audio_output/wasapi.c


Changes:

=====================================
modules/audio_output/wasapi.c
=====================================
@@ -526,6 +526,7 @@ static void LogWaveFormat(struct vlc_logger *l, const 
WAVEFORMATEX *restrict wf)
 static int vlc_FromWave(const WAVEFORMATEX *restrict wf,
                         audio_sample_format_t *restrict audio)
 {
+    uint32_t physical_channels = 0;
     if (wf->wFormatTag == WAVE_FORMAT_EXTENSIBLE &&
         wf->cbSize >= sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX))
     {
@@ -566,13 +567,13 @@ static int vlc_FromWave(const WAVEFORMATEX *restrict wf,
 
         for (unsigned i = 0; chans_in[i]; i++)
             if (wfe->dwChannelMask & chans_in[i])
-                audio->i_physical_channels |= pi_vlc_chan_order_wg4[i];
+                physical_channels |= pi_vlc_chan_order_wg4[i];
     }
     else
         return -1;
 
     audio->i_rate = wf->nSamplesPerSec;
-    audio->i_physical_channels = 0;
+    audio->i_physical_channels = physical_channels;
 
     aout_FormatPrepare (audio);
 



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/22590583f4ff444ffe83a74945b18344de30af9e

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/22590583f4ff444ffe83a74945b18344de30af9e
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to