[MPlayer-cvslog] r23550 - trunk/libmpdemux/demux_mpg.c

nicodvb subversion at mplayerhq.hu
Wed Jun 13 00:08:30 CEST 2007


Author: nicodvb
Date: Wed Jun 13 00:08:30 2007
New Revision: 23550

Log:
clearly specify the valid substream id range, rather than using unreadable bitmasks (it also prevents misdetection 0xFF as valid)

Modified:
   trunk/libmpdemux/demux_mpg.c

Modified: trunk/libmpdemux/demux_mpg.c
==============================================================================
--- trunk/libmpdemux/demux_mpg.c	(original)
+++ trunk/libmpdemux/demux_mpg.c	Wed Jun 13 00:08:30 2007
@@ -414,7 +414,8 @@ static int demux_mpg_read_packet(demuxer
       
       // 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 @@ static int demux_mpg_read_packet(demuxer
             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



More information about the MPlayer-cvslog mailing list