summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authornicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-06-12 22:08:30 +0000
committernicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-06-12 22:08:30 +0000
commite2ed3cb72db8732e7cb73458d97cc6bcc6a5b901 (patch)
treea0d8bc87eacbf707fd2d45d4251ba9479416eed9 /libmpdemux
parentd04d9b3c95b4a9014ee02958c1ced8a38d771adc (diff)
downloadmpv-e2ed3cb72db8732e7cb73458d97cc6bcc6a5b901.tar.bz2
mpv-e2ed3cb72db8732e7cb73458d97cc6bcc6a5b901.tar.xz
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
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_mpg.c5
1 files changed, 3 insertions, 2 deletions
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