[vlc-commits] avcodec: fix Ambisonics AAC order 1 streams

Adrien Maglo git at videolan.org
Wed May 16 19:09:32 CEST 2018


vlc/vlc-3.0 | branch: master | Adrien Maglo <magsoft at videolan.org> | Mon May 14 16:55:00 2018 +0200| [9ab64e5ba7ecdd92d46707e2e78e324fe1e9d8c9] | committer: Jean-Baptiste Kempf

avcodec: fix Ambisonics AAC order 1 streams

Do not reorder the audio channels. Keep the avcodec order.

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

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

 modules/codec/avcodec/audio.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
index b9eb7d5856..eec255ae0b 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -624,19 +624,11 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust )
         if( i_channels_dst != i_channels_src && b_trust )
             msg_Warn( p_dec, "%d channels are dropped", i_channels_src - i_channels_dst );
 
-        /* Restore the right order of Ambisonic order 1 channels encoded in AAC... */
+        /* No reordering for Ambisonic order 1 channels encoded in AAC... */
         if (p_dec->fmt_out.audio.channel_type == AUDIO_CHANNEL_TYPE_AMBISONICS
             && p_dec->fmt_in.i_codec == VLC_CODEC_MP4A
             && i_channels_src == 4)
-        {
-            p_sys->pi_extraction[0] = 2;
-            p_sys->pi_extraction[1] = 0;
-            p_sys->pi_extraction[2] = 1;
-            p_sys->pi_extraction[3] = 3;
-            i_layout_dst = AOUT_CHAN_CENTER | AOUT_CHAN_LEFT
-                    | AOUT_CHAN_RIGHT | AOUT_CHAN_REARCENTER;
-            p_sys->b_extract = true;
-        }
+            p_sys->b_extract = false;
 
         p_dec->fmt_out.audio.i_physical_channels = i_layout_dst;
     }



More information about the vlc-commits mailing list