From 4eca33639f3d69767e15c92b35fc7387453ae126 Mon Sep 17 00:00:00 2001 From: arpi_esp Date: Sat, 14 Apr 2001 22:51:56 +0000 Subject: [PATCH] print help before reading font+sub git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@426 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mplayer.c | 57 +++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/mplayer.c b/mplayer.c index b2ec49bf5b..3e7fca5366 100644 --- a/mplayer.c +++ b/mplayer.c @@ -452,6 +452,34 @@ if(video_driver && strcmp(video_driver,"help")==0){ exit(0); } +if(!filename){ + if(vcd_track) filename="/dev/cdrom"; + else { + printf("%s",help_text); exit(0); + } +} + +// check video_out driver name: + if(!video_driver) + video_out=video_out_drivers[0]; + else + for (i=0; video_out_drivers[i] != NULL; i++){ + const vo_info_t *info = video_out_drivers[i]->get_info (); + if(strcmp(info->short_name,video_driver) == 0){ + video_out = video_out_drivers[i];break; + } + } + if(!video_out){ + printf("Invalid video output driver name: %s\n",video_driver); + return 0; + } + +// check codec.conf +if(!parse_codec_cfg(get_path("codecs.conf"))){ + printf("(copy/link DOCS/codecs.conf to ~/.mplayer/codecs.conf)\n"); + exit(1); +} + // check font if(font_name){ vo_font=read_font_desc(font_name,font_factor,verbose>1); @@ -471,35 +499,6 @@ if(video_driver && strcmp(video_driver,"help")==0){ } -// check video_out driver name: - if(!video_driver) - video_out=video_out_drivers[0]; - else - for (i=0; video_out_drivers[i] != NULL; i++){ - const vo_info_t *info = video_out_drivers[i]->get_info (); - if(strcmp(info->short_name,video_driver) == 0){ - video_out = video_out_drivers[i];break; - } - } - if(!video_out){ - printf("Invalid video output driver name: %s\n",video_driver); - return 0; - } - -if(!filename){ - if(vcd_track) filename="/dev/cdrom"; - else { - printf("%s",help_text); exit(0); - } -} - -// check codec.conf -if(!parse_codec_cfg(get_path("codecs.conf"))){ - printf("(copy/link DOCS/codecs.conf to ~/.mplayer/codecs.conf)\n"); - exit(1); -} - - if(vcd_track){ //============ Open VideoCD track ============== f=open(filename,O_RDONLY);