# HG changeset patch # User arpi_esp # Date 987288716 0 # Node ID ca9c8ca4fe670a6f9680bda45a87fdaa41a96168 # Parent 3ec86df87b02bd89297aa00a510b6b417e2c0fae print help before reading font+sub diff -r 3ec86df87b02 -r ca9c8ca4fe67 mplayer.c --- a/mplayer.c Sat Apr 14 22:50:25 2001 +0000 +++ b/mplayer.c Sat Apr 14 22:51:56 2001 +0000 @@ -452,6 +452,34 @@ 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 @@ } -// 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);