summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-09-27 12:59:35 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-09-27 12:59:35 +0000
commit85623cf7b6df2eb5bf9d7a4c5ce7db309c116e18 (patch)
tree4f845e325d5d535cedfb6164dbbd645acdf52168 /mplayer.c
parent70af2210743964ff60266fbf94f0cbef92bc2eec (diff)
downloadmpv-85623cf7b6df2eb5bf9d7a4c5ce7db309c116e18.tar.bz2
mpv-85623cf7b6df2eb5bf9d7a4c5ce7db309c116e18.tar.xz
-ac help / -vc help
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1984 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c35
1 files changed, 23 insertions, 12 deletions
diff --git a/mplayer.c b/mplayer.c
index 40457df43e..a717034b26 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -430,11 +430,7 @@ if ((conffile = get_path("")) == NULL) {
}
}
-//ifndef HAVE_GUI
- int main(int argc,char* argv[], char *envp[]){
-//else
-// int mplayer(int argc,char* argv[], char *envp[]){
-//endif
+int main(int argc,char* argv[], char *envp[]){
#ifdef USE_SUB
static subtitle* subtitles=NULL;
@@ -530,6 +526,28 @@ int gui_no_filename=0;
exit(0);
}
+// check codec.conf
+if(!parse_codec_cfg(get_path("codecs.conf"))){
+ if(!parse_codec_cfg(DATADIR"/codecs.conf")){
+ mp_msg(MSGT_CPLAYER,MSGL_HINT,MSGTR_CopyCodecsConf);
+ exit(1);
+ }
+}
+
+ if(audio_codec && strcmp(audio_codec,"help")==0){
+ printf("Available audio codecs:\n");
+ list_codecs(1);
+ printf("\n");
+ exit(0);
+ }
+ if(video_codec && strcmp(video_codec,"help")==0){
+ printf("Available video codecs:\n");
+ list_codecs(0);
+ printf("\n");
+ exit(0);
+ }
+
+
if(!num_filenames && !vcd_track && !dvd_title){
if(!use_gui){
// no file/vcd/dvd -> show HELP:
@@ -550,13 +568,6 @@ int gui_no_filename=0;
//------ load global data first ------
-// check codec.conf
-if(!parse_codec_cfg(get_path("codecs.conf"))){
- if(!parse_codec_cfg(DATADIR"/codecs.conf")){
- mp_msg(MSGT_CPLAYER,MSGL_HINT,MSGTR_CopyCodecsConf);
- exit(1);
- }
-}
// check font
#ifdef USE_OSD