diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-07-16 15:36:20 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-07-16 15:36:20 +0000 |
commit | a0cc8bfb13d90d8170e7058ace181b5fb47f19b2 (patch) | |
tree | 42e5687a53170e7d39b837f42d9e778c955ee1ac /mplayer.c | |
parent | 53ecd003dfa05277790f4510cdf15d9dc18cea61 (diff) | |
download | mpv-a0cc8bfb13d90d8170e7058ace181b5fb47f19b2.tar.bz2 mpv-a0cc8bfb13d90d8170e7058ace181b5fb47f19b2.tar.xz |
ds->type removed - using id-based audio format detection in mplayer.c
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1332 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -911,11 +911,10 @@ switch(file_format){ has_audio=0;sh_audio=NULL; } else { sh_audio=d_audio->sh;sh_audio->ds=d_audio; - if(verbose) printf("detected MPG-PS audio format: %d\n",d_audio->type); - switch(d_audio->type){ - case 1: sh_audio->format=0x50;break; // mpeg - case 2: sh_audio->format=0x10001;break; // dvd pcm - case 3: sh_audio->format=0x2000;break; // ac3 + switch(d_audio->id & 0xE0){ // 1110 0000 b (high 3 bit: type low 5: id) + case 0x00: sh_audio->format=0x50;break; // mpeg + case 0xA0: sh_audio->format=0x10001;break; // dvd pcm + case 0x80: sh_audio->format=0x2000;break; // ac3 default: has_audio=0;sh_audio=NULL; // unknown type } } |