diff --git a/cfg-common.h b/cfg-common.h index 17e9ef2131..6fa1478c0b 100644 --- a/cfg-common.h +++ b/cfg-common.h @@ -100,8 +100,8 @@ #endif // disable audio - {"sound", &has_audio, CONF_TYPE_FLAG, 0, 0, 1, NULL}, - {"nosound", &has_audio, CONF_TYPE_FLAG, 0, 1, 0, NULL}, + {"sound", &audio_id, CONF_TYPE_FLAG, 0, -2, -1, NULL}, + {"nosound", &audio_id, CONF_TYPE_FLAG, 0, -1, -2, NULL}, // select audio/video codec (by name) or codec family (by number): // {"afm", &audio_family, CONF_TYPE_INT, CONF_MIN, 0, 22, NULL}, // keep ranges in sync diff --git a/mencoder.c b/mencoder.c index 359e74a5fb..4fa53ae217 100644 --- a/mencoder.c +++ b/mencoder.c @@ -91,12 +91,9 @@ char* audio_lang=NULL; char* dvdsub_lang=NULL; static char* spudec_ifo=NULL; -static int has_audio=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_list=NULL; // override video codec family +char** audio_codec_list=NULL; // override audio codec +char** video_codec_list=NULL; // override video codec +char** audio_fm_list=NULL; // override audio codec family char** video_fm_list=NULL; // override video codec family int out_audio_codec=-1; @@ -451,7 +448,7 @@ if(stream->type==STREAMTYPE_DVD){ if(stream_cache_size) stream_enable_cache(stream,stream_cache_size*1024,0,0); - if(!has_audio || demuxer2) audio_id=-2; /* do NOT read audio packets... */ + if(demuxer2) audio_id=-2; /* do NOT read audio packets... */ //demuxer=demux_open(stream,file_format,video_id,audio_id,dvdsub_id); demuxer=demux_open(stream,file_format,audio_id,video_id,dvdsub_id); diff --git a/mplayer.c b/mplayer.c index af85148741..1b781979ad 100644 --- a/mplayer.c +++ b/mplayer.c @@ -174,13 +174,9 @@ float rel_seek_secs=0; int abs_seek_pos=0; // codecs: -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 **audio_codec_list=NULL; // override audio codec char **video_codec_list=NULL; // override video codec -char **audio_fm_list=NULL; // override video codec family +char **audio_fm_list=NULL; // override audio codec family char **video_fm_list=NULL; // override video codec family // streaming: @@ -1058,8 +1054,6 @@ if(stream_cache_size){ //============ Open DEMUXERS --- DETECT file type ======================= -if(!has_audio) audio_id=-2; // do NOT read audio packets... - current_module="demux_open"; demuxer=demux_open(stream,file_format,audio_id,video_id,dvdsub_id); diff --git a/mplayer.h b/mplayer.h index 901eb449fb..0bb6b549e8 100644 --- a/mplayer.h +++ b/mplayer.h @@ -14,7 +14,6 @@ extern char ** audio_fm_list; extern char ** video_fm_list; extern char * video_driver; extern char * audio_driver; -extern int has_audio; extern float audio_delay; extern int osd_level;