Mercurial > mplayer.hg
comparison mplayer.c @ 1331:b4457de47804
ds->type removed - using id-based audio format detection in mplayer.c
author | arpi |
---|---|
date | Mon, 16 Jul 2001 15:36:20 +0000 |
parents | 8940480b3856 |
children | 061cabfbc07b |
comparison
equal
deleted
inserted
replaced
1330:8940480b3856 | 1331:b4457de47804 |
---|---|
909 if(!ds_fill_buffer(d_audio)){ | 909 if(!ds_fill_buffer(d_audio)){ |
910 printf("MPEG: No Audio stream found... ->nosound\n"); | 910 printf("MPEG: No Audio stream found... ->nosound\n"); |
911 has_audio=0;sh_audio=NULL; | 911 has_audio=0;sh_audio=NULL; |
912 } else { | 912 } else { |
913 sh_audio=d_audio->sh;sh_audio->ds=d_audio; | 913 sh_audio=d_audio->sh;sh_audio->ds=d_audio; |
914 if(verbose) printf("detected MPG-PS audio format: %d\n",d_audio->type); | 914 switch(d_audio->id & 0xE0){ // 1110 0000 b (high 3 bit: type low 5: id) |
915 switch(d_audio->type){ | 915 case 0x00: sh_audio->format=0x50;break; // mpeg |
916 case 1: sh_audio->format=0x50;break; // mpeg | 916 case 0xA0: sh_audio->format=0x10001;break; // dvd pcm |
917 case 2: sh_audio->format=0x10001;break; // dvd pcm | 917 case 0x80: sh_audio->format=0x2000;break; // ac3 |
918 case 3: sh_audio->format=0x2000;break; // ac3 | |
919 default: has_audio=0;sh_audio=NULL; // unknown type | 918 default: has_audio=0;sh_audio=NULL; // unknown type |
920 } | 919 } |
921 } | 920 } |
922 } | 921 } |
923 break; | 922 break; |