[vlc-commits] FLAC: fix 7 channels layout

Rémi Denis-Courmont git at videolan.org
Tue Jan 22 19:37:17 CET 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jan 22 20:24:08 2013 +0200| [6821ffc8efb5e843f677ae2fdae77de0a1743294] | committer: Rémi Denis-Courmont

FLAC: fix 7 channels layout

See http://flac.sourceforge.net/format.html

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

 modules/codec/flac.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/modules/codec/flac.c b/modules/codec/flac.c
index 543e8bb..25bc92c 100644
--- a/modules/codec/flac.c
+++ b/modules/codec/flac.c
@@ -80,8 +80,8 @@ static const int pi_channels_maps[9] =
     AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER
      | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT | AOUT_CHAN_LFE,
     AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER
-     | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT | AOUT_CHAN_MIDDLELEFT
-     | AOUT_CHAN_MIDDLERIGHT,
+     | AOUT_CHAN_REARCENTER | AOUT_CHAN_MIDDLELEFT| AOUT_CHAN_MIDDLERIGHT
+     | AOUT_CHAN_LFE,
     AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER | AOUT_CHAN_REARLEFT
      | AOUT_CHAN_REARRIGHT | AOUT_CHAN_MIDDLELEFT | AOUT_CHAN_MIDDLERIGHT
      | AOUT_CHAN_LFE
@@ -147,16 +147,15 @@ DecoderWriteCallback( const FLAC__StreamDecoder *decoder,
 {
     /* XXX it supposes our internal format is WG4 */
     static const unsigned char ppi_reorder[1+8][8] = {
-        {-1},
+        { },
         { 0, },
         { 0, 1 },
         { 0, 1, 2 },
         { 0, 1, 2, 3 },
         { 0, 1, 3, 4, 2 },
         { 0, 1, 4, 5, 2, 3 },
-
-        { 0, 1, 6, 4, 5, 2, 3 },    /* 7.0 Unspecified by flac, but following SMPTE */
-        { 0, 1, 6, 7, 4, 5, 2, 3 }, /* 7.1 Unspecified by flac, but following SMPTE */
+        { 0, 1, 5, 6, 4, 2, 3 },
+        { 0, 1, 6, 7, 4, 5, 2, 3 },
     };
 
     VLC_UNUSED(decoder);



More information about the vlc-commits mailing list