[vlc-commits] auhal: Use encoded audio output if this was stored before

David Fuhrmann git at videolan.org
Tue Feb 18 22:42:25 CET 2020


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sat Feb 15 12:27:06 2020 +0100| [a8176a8353dc21a9302e939c59a0738227cb68ee] | committer: David Fuhrmann

auhal: Use encoded audio output if this was stored before

Encoded output is stored in VLCs settings by adding the
AOUT_VAR_SPDIF_FLAG flag to the integer. Make sure this
configuration is also picked up again after restart, if it is stored
and actually available.

Credits: Andrey Y.
fixes #21170

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

 modules/audio_output/auhal.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index b56e609bc3..03b7ed693a 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -519,6 +519,7 @@ RebuildDeviceList(audio_output_t * p_aout, UInt32 *p_id_exists)
             continue;
         }
 
+        // Report back audio device in analog mode
         if (p_id_exists && i_id == i_id_exists)
             *p_id_exists = i_id;
 
@@ -540,6 +541,10 @@ RebuildDeviceList(audio_output_t * p_aout, UInt32 *p_id_exists)
             CFArrayAppendValue(currentListOfDevices, deviceNumber);
             CFRelease(deviceNumber);
             free(psz_encoded_name);
+
+            // Report back audio device in digital mode
+            if (p_id_exists && i_id == i_id_exists)
+                *p_id_exists = i_id;
         }
 
         // TODO: only register once for each device



More information about the vlc-commits mailing list