comparison mplayer.c @ 425:ca9c8ca4fe67

print help before reading font+sub
author arpi_esp
date Sat, 14 Apr 2001 22:51:56 +0000
parents ad05b8b1aa7e
children 26e513f392b2
comparison
equal deleted inserted replaced
424:3ec86df87b02 425:ca9c8ca4fe67
450 } 450 }
451 printf("\n"); 451 printf("\n");
452 exit(0); 452 exit(0);
453 } 453 }
454 454
455 // check font 455 if(!filename){
456 if(font_name){ 456 if(vcd_track) filename="/dev/cdrom";
457 vo_font=read_font_desc(font_name,font_factor,verbose>1); 457 else {
458 if(!vo_font) printf("Can't load font: %s\n",font_name); 458 printf("%s",help_text); exit(0);
459 } else { 459 }
460 // try default: 460 }
461 vo_font=read_font_desc(get_path("font/font.desc"),font_factor,verbose>1);
462 }
463
464 // check .sub
465 if(sub_name){
466 subtitles=sub_read_file(sub_name);
467 if(!subtitles) printf("Can't load subtitles: %s\n",font_name);
468 } else {
469 // try default:
470 subtitles=sub_read_file(get_path("default.sub"));
471 }
472
473 461
474 // check video_out driver name: 462 // check video_out driver name:
475 if(!video_driver) 463 if(!video_driver)
476 video_out=video_out_drivers[0]; 464 video_out=video_out_drivers[0];
477 else 465 else
484 if(!video_out){ 472 if(!video_out){
485 printf("Invalid video output driver name: %s\n",video_driver); 473 printf("Invalid video output driver name: %s\n",video_driver);
486 return 0; 474 return 0;
487 } 475 }
488 476
489 if(!filename){
490 if(vcd_track) filename="/dev/cdrom";
491 else {
492 printf("%s",help_text); exit(0);
493 }
494 }
495
496 // check codec.conf 477 // check codec.conf
497 if(!parse_codec_cfg(get_path("codecs.conf"))){ 478 if(!parse_codec_cfg(get_path("codecs.conf"))){
498 printf("(copy/link DOCS/codecs.conf to ~/.mplayer/codecs.conf)\n"); 479 printf("(copy/link DOCS/codecs.conf to ~/.mplayer/codecs.conf)\n");
499 exit(1); 480 exit(1);
500 } 481 }
482
483 // check font
484 if(font_name){
485 vo_font=read_font_desc(font_name,font_factor,verbose>1);
486 if(!vo_font) printf("Can't load font: %s\n",font_name);
487 } else {
488 // try default:
489 vo_font=read_font_desc(get_path("font/font.desc"),font_factor,verbose>1);
490 }
491
492 // check .sub
493 if(sub_name){
494 subtitles=sub_read_file(sub_name);
495 if(!subtitles) printf("Can't load subtitles: %s\n",font_name);
496 } else {
497 // try default:
498 subtitles=sub_read_file(get_path("default.sub"));
499 }
501 500
502 501
503 if(vcd_track){ 502 if(vcd_track){
504 //============ Open VideoCD track ============== 503 //============ Open VideoCD track ==============
505 f=open(filename,O_RDONLY); 504 f=open(filename,O_RDONLY);