]> git.sesse.net Git - vlc/commitdiff
codec: dts: fix custom channel mapping detection/tautology
authorFrancois Cartegnie <fcvlcdev@free.fr>
Mon, 9 Feb 2015 18:36:00 +0000 (19:36 +0100)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Mon, 9 Feb 2015 18:36:00 +0000 (19:36 +0100)
modules/codec/dts.c

index 09ebc0d75727cb402aa26df3cefc97a58785d9bb..5d777d4f01eb29dd47e0d4fb5693d7e52e9d49f3 100644 (file)
@@ -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;