[vlc-commits] spatialaudio: error in case of mono output

Thomas Guillem git at videolan.org
Tue Aug 29 11:47:45 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Aug 29 11:42:30 2017 +0200| [a9fcd603ab25b79f2981481aff4c390315e401ec] | committer: Thomas Guillem

spatialaudio: error in case of mono output

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

 modules/audio_filter/channel_mixer/spatialaudio.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/audio_filter/channel_mixer/spatialaudio.cpp b/modules/audio_filter/channel_mixer/spatialaudio.cpp
index 59d2c6336d..6482b7dc7b 100644
--- a/modules/audio_filter/channel_mixer/spatialaudio.cpp
+++ b/modules/audio_filter/channel_mixer/spatialaudio.cpp
@@ -453,8 +453,10 @@ static int Open(vlc_object_t *p_this)
         p_sys->mode = filter_sys_t::AMBISONICS_DECODER;
 
         unsigned i_nbChannels = aout_FormatNbChannels(&p_filter->fmt_out.audio);
-        if (!p_sys->speakerDecoder.Configure(p_sys->i_order, true,
-            kAmblib_CustomSpeakerSetUp, i_nbChannels))
+        if (i_nbChannels == 1
+         || !p_sys->speakerDecoder.Configure(p_sys->i_order, true,
+                                             kAmblib_CustomSpeakerSetUp,
+                                             i_nbChannels))
         {
             msg_Err(p_filter, "Error creating the Ambisonics decoder.");
             delete p_sys;



More information about the vlc-commits mailing list