[vlc-commits] auhal: only analog doesn't support an unknow channel layout

Thomas Guillem git at videolan.org
Fri Mar 3 18:47:42 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Mar  3 18:24:29 2017 +0100| [d866b408bac8a12a26c02b86f341bbede20b803d] | committer: Thomas Guillem

auhal: only analog doesn't support an unknow channel layout

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

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

diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index cbe7532..7451e6e 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -955,6 +955,9 @@ StartAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt,
     UInt32                      i_param_size;
     AudioChannelLayout          *layout = NULL;
 
+    if (aout_FormatNbChannels(fmt) == 0)
+        return VLC_EGENERIC;
+
     p_sys->au_unit = au_NewOutputInstance(p_aout, kAudioUnitSubType_HALOutput);
     if (p_sys->au_unit == NULL)
         return VLC_EGENERIC;
@@ -1387,7 +1390,7 @@ Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
      * property size */
     int                     b_alive = false;
 
-    if (aout_FormatNbChannels(fmt) == 0 || AOUT_FMT_HDMI(fmt))
+    if (AOUT_FMT_HDMI(fmt))
         return VLC_EGENERIC;
 
     p_sys = p_aout->sys;



More information about the vlc-commits mailing list