summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-09-28 02:23:20 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-09-28 02:23:20 +0000
commitdbf0fe78c631aa786c54afe7fbb1ee63c359a0b0 (patch)
treec0a5c20701f23da143ef9b0d12ec2b78b49c5dc0 /mplayer.c
parent7f62a29ed9126ba3d55f45476f42510ca98beed7 (diff)
downloadmpv-dbf0fe78c631aa786c54afe7fbb1ee63c359a0b0.tar.bz2
mpv-dbf0fe78c631aa786c54afe7fbb1ee63c359a0b0.tar.xz
-ac/-afm rewrite, now works the same way as -vc/-vfm
including audio codec fallbacks if init failed git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7523 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mplayer.c b/mplayer.c
index 18210fd313..133bbd5c1b 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -178,9 +178,11 @@ int has_audio=1;
int has_video=1;
char *audio_codec=NULL; // override audio codec
char *video_codec=NULL; // override video codec
+char **audio_codec_list=NULL; // override video codec
char **video_codec_list=NULL; // override video codec
char *audio_fm=NULL; // override audio codec family
char *video_fm=NULL; // override video codec family
+char **audio_fm_list=NULL; // override video codec family
char **video_fm_list=NULL; // override video codec family
// streaming:
@@ -631,7 +633,7 @@ if(!parse_codec_cfg(get_path("codecs.conf"))){
printf("vc#%d: '%s'\n",i,video_codec_list[i]);
}
#endif
- if(audio_codec && strcmp(audio_codec,"help")==0){
+ if(audio_codec_list && strcmp(audio_codec_list[0],"help")==0){
mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_AvailableAudioCodecs);
list_codecs(1);
printf("\n");
@@ -648,7 +650,7 @@ if(!parse_codec_cfg(get_path("codecs.conf"))){
printf("\n");
exit(0);
}
- if(audio_fm && strcmp(audio_fm,"help")==0){
+ if(audio_fm_list && strcmp(audio_fm_list[0],"help")==0){
afm_help();
printf("\n");
exit(0);
@@ -1216,7 +1218,7 @@ if(sh_audio){
// Go through the codec.conf and find the best codec...
current_module="init_audio_codec";
mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");
- if(!init_best_audio_codec(sh_audio,audio_codec,audio_fm)){
+ if(!init_best_audio_codec(sh_audio,audio_codec_list,audio_fm_list)){
sh_audio=d_audio->sh=NULL; // failed to init :(
}
mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");