changeset 23530:c325aaa89171

clearly specify the valid substream id range, rather than using unreadable bitmasks (it also prevents misdetection 0xFF as valid)
author nicodvb
date Tue, 12 Jun 2007 22:08:30 +0000
parents 3999aa0d11f3
children bd9e74cd4d3d
files libmpdemux/demux_mpg.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mpg.c	Tue Jun 12 20:31:49 2007 +0000
+++ b/libmpdemux/demux_mpg.c	Tue Jun 12 22:08:30 2007 +0000
@@ -414,7 +414,8 @@
       
       // AID:
       // 0x20..0x3F  subtitle
-      // 0x80..0x9F  AC3 audio
+      // 0x80..0x87 and 0xC0..0xCF  AC3 audio
+      // 0x88..0x8F and 0x98..0x9F  DTS audio
       // 0xA0..0xBF  PCM audio
       
       if((aid & 0xE0) == 0x20){
@@ -434,7 +435,7 @@
             ds=demux->sub;
         }
           
-      } else if((aid & 0xC0) == 0x80 || (aid & 0xE0) == 0x00 || (aid & 0xC0) == 0xC0) {
+      } else if((aid >= 0x80 && aid <= 0x8F) || (aid >= 0x98 && aid <= 0xAF) || (aid >= 0xC0 && aid <= 0xCF)) {
 
 //        aid=128+(aid&0x7F);
         // aid=0x80..0xBF