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);