[vlc-commits] codec: dts: fix custom channel mapping detection/tautology

Francois Cartegnie git at videolan.org
Mon Feb 16 20:44:08 CET 2015


vlc/vlc-2.2 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Feb  9 19:36:00 2015 +0100| [ec8fbd5455d15c5deb79e7334055880bfdbef6b0] | committer: Jean-Baptiste Kempf

codec: dts: fix custom channel mapping detection/tautology

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

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

 modules/codec/dts.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/codec/dts.c b/modules/codec/dts.c
index 09ebc0d..5d777d4 100644
--- a/modules/codec/dts.c
+++ b/modules/codec/dts.c
@@ -548,18 +548,20 @@ static int SyncInfo( const uint8_t *p_buf,
                                 AOUT_CHAN_REARRIGHT | AOUT_CHAN_LFE;
             break;
 
+        case 0xF:
         default:
-            if( i_audio_mode <= 63 )
+            if( (i_audio_mode & 0xFFFF) >= 0x10 )
             {
                 /* User defined */
                 *pi_channels = 0;
                 *pi_channels_conf = 0;
             }
             else return 0;
+
             break;
     }
 
-    if( i_audio_mode & 0x10000 )
+    if( *pi_channels && (i_audio_mode & 0x10000) )
     {
         (*pi_channels)++;
         *pi_channels_conf |= AOUT_CHAN_LFE;



More information about the vlc-commits mailing list