From e2ed3cb72db8732e7cb73458d97cc6bcc6a5b901 Mon Sep 17 00:00:00 2001 From: nicodvb Date: Tue, 12 Jun 2007 22:08:30 +0000 Subject: clearly specify the valid substream id range, rather than using unreadable bitmasks (it also prevents misdetection 0xFF as valid) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23550 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_mpg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libmpdemux/demux_mpg.c') diff --git a/libmpdemux/demux_mpg.c b/libmpdemux/demux_mpg.c index ed53145ad4..3498a40472 100644 --- a/libmpdemux/demux_mpg.c +++ b/libmpdemux/demux_mpg.c @@ -414,7 +414,8 @@ static int demux_mpg_read_packet(demuxer_t *demux,int id){ // 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_t *demux,int id){ 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 -- cgit v1.2.3