[Mplayer-cvslog] CVS: main mplayer.c,1.165,1.166

GEREOFFY arpi_esp at users.sourceforge.net
Sun Jun 24 02:02:25 CEST 2001


Update of /cvsroot/mplayer/main
In directory usw-pr-cvs1:/tmp/cvs-serv13803

Modified Files:
	mplayer.c 
Log Message:
fatal-error printfs moved stdout->stderr

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.165
retrieving revision 1.166
diff -C2 -r1.165 -r1.166
*** mplayer.c	2001/06/23 17:10:52	1.165
--- mplayer.c	2001/06/24 00:02:23	1.166
***************
*** 431,435 ****
      kill(getpid(),SIGKILL);
    }
!   printf("\nMPlayer interrupted by signal %d in module: %s \n",x,
        current_module?current_module:"unknown"
    );
--- 431,435 ----
      kill(getpid(),SIGKILL);
    }
!   fprintf(stderr,"\nMPlayer interrupted by signal %d in module: %s \n",x,
        current_module?current_module:"unknown"
    );
***************
*** 589,593 ****
    }
    if(!video_out){
!     printf("Invalid video output driver name: %s\nUse '-vo help' to get a list of available video drivers.\n",video_driver);
      return 0;
    }
--- 589,593 ----
    }
    if(!video_out){
!     fprintf(stderr,"Invalid video output driver name: %s\nUse '-vo help' to get a list of available video drivers.\n",video_driver);
      return 0;
    }
***************
*** 618,622 ****
    }
    if (!audio_out){
!     printf("Invalid audio output driver name: %s\nUse '-ao help' to get a list of available audio drivers.\n",audio_driver);
      return 0;
    }
--- 618,622 ----
    }
    if (!audio_out){
!     fprintf(stderr,"Invalid audio output driver name: %s\nUse '-ao help' to get a list of available audio drivers.\n",audio_driver);
      return 0;
    }
***************
*** 633,637 ****
    if(font_name){
         vo_font=read_font_desc(font_name,font_factor,verbose>1);
!        if(!vo_font) printf("Can't load font: %s\n",font_name);
    } else {
        // try default:
--- 633,637 ----
    if(font_name){
         vo_font=read_font_desc(font_name,font_factor,verbose>1);
!        if(!vo_font) fprintf(stderr,"Can't load font: %s\n",font_name);
    } else {
        // try default:
***************
*** 642,646 ****
    if(sub_name){
         subtitles=sub_read_file(sub_name);
!        if(!subtitles) printf("Can't load subtitles: %s\n",sub_name);
    } else {
      if ( sub_auto )
--- 642,646 ----
    if(sub_name){
         subtitles=sub_read_file(sub_name);
!        if(!subtitles) fprintf(stderr,"Can't load subtitles: %s\n",sub_name);
    } else {
      if ( sub_auto )
***************
*** 657,666 ****
    int ret,ret2;
    f=open(filename,O_RDONLY);
!   if(f<0){ printf("CD-ROM Device '%s' not found!\n",filename);return 1; }
    vcd_read_toc(f);
    ret2=vcd_get_track_end(f,vcd_track);
!   if(ret2<0){ printf("Error selecting VCD track!\n");return 1;}
    ret=vcd_seek_to_track(f,vcd_track);
!   if(ret<0){ printf("Error selecting VCD track!\n");return 1;}
    seek_to_byte+=ret;
    if(verbose) printf("VCD start byte position: 0x%X  end: 0x%X\n",seek_to_byte,ret2);
--- 657,666 ----
    int ret,ret2;
    f=open(filename,O_RDONLY);
!   if(f<0){ fprintf(stderr,"CD-ROM Device '%s' not found!\n",filename);return 1; }
    vcd_read_toc(f);
    ret2=vcd_get_track_end(f,vcd_track);
!   if(ret2<0){ fprintf(stderr,"Error selecting VCD track!\n");return 1;}
    ret=vcd_seek_to_track(f,vcd_track);
!   if(ret<0){ fprintf(stderr,"Error selecting VCD track!\n");return 1;}
    seek_to_byte+=ret;
    if(verbose) printf("VCD start byte position: 0x%X  end: 0x%X\n",seek_to_byte,ret2);
***************
*** 691,695 ****
  #endif
         f=open(filename,O_RDONLY);
!        if(f<0){ printf("File not found: '%s'\n",filename);return 1; }
         len=lseek(f,0,SEEK_END); lseek(f,0,SEEK_SET);
         stream=new_stream(f,STREAMTYPE_FILE);
--- 691,695 ----
  #endif
         f=open(filename,O_RDONLY);
!        if(f<0){ fprintf(stderr,"File not found: '%s'\n",filename);return 1; }
         len=lseek(f,0,SEEK_END); lseek(f,0,SEEK_SET);
         stream=new_stream(f,STREAMTYPE_FILE);
***************
*** 699,708 ****
          file_format=autodetectProtocol( url, &f );
          if( file_format==DEMUXER_TYPE_UNKNOWN ) { 
!           printf("Unable to open URL: %s\n", filename);
            url_free(url);
            return 1; 
          } else {
            f=streaming_start( &url, f, file_format );
!           if(f<0){ printf("Unable to open URL: %s\n", url->url); return 1; }
            printf("Connected to server: %s\n", url->hostname );
          }
--- 699,708 ----
          file_format=autodetectProtocol( url, &f );
          if( file_format==DEMUXER_TYPE_UNKNOWN ) { 
!           fprintf(stderr,"Unable to open URL: %s\n", filename);
            url_free(url);
            return 1; 
          } else {
            f=streaming_start( &url, f, file_format );
!           if(f<0){ fprintf(stderr,"Unable to open URL: %s\n", url->url); return 1; }
            printf("Connected to server: %s\n", url->hostname );
          }
***************
*** 802,807 ****
  //=============== Unknown, exiting... ===========================
  if(file_format==DEMUXER_TYPE_UNKNOWN){
!   printf("============= Sorry, this file format not recognized/supported ===============\n");
!   printf("=== If this file is an AVI, ASF or MPEG stream, please contact the author! ===\n");
    GUI_MSG( mplUnknowFileType )
    exit(1);
--- 802,807 ----
  //=============== Unknown, exiting... ===========================
  if(file_format==DEMUXER_TYPE_UNKNOWN){
!   fprintf(stderr,"============= Sorry, this file format not recognized/supported ===============\n");
!   fprintf(stderr,"=== If this file is an AVI, ASF or MPEG stream, please contact the author! ===\n");
    GUI_MSG( mplUnknowFileType )
    exit(1);
***************
*** 857,861 ****
        }
        if(v_pos==-1){
!         printf("AVI_NI: missing video stream!? contact the author, it may be a bug :(\n");
          GUI_MSG( mplErrorAVINI )
          exit(1);
--- 857,861 ----
        }
        if(v_pos==-1){
!         fprintf(stderr,"AVI_NI: missing video stream!? contact the author, it may be a bug :(\n");
          GUI_MSG( mplErrorAVINI )
          exit(1);
***************
*** 882,886 ****
    }
    if(!ds_fill_buffer(d_video)){
!     printf("AVI: missing video stream!? contact the author, it may be a bug :(\n");
      GUI_MSG( mplAVIErrorMissingVideoStream )
      exit(1);
--- 882,886 ----
    }
    if(!ds_fill_buffer(d_video)){
!     fprintf(stderr,"AVI: missing video stream!? contact the author, it may be a bug :(\n");
      GUI_MSG( mplAVIErrorMissingVideoStream )
      exit(1);
***************
*** 986,990 ****
    }
    if(!ds){        
!       printf("dump: FATAL: selected stream missing!\n");
        exit(1);
    }
--- 986,990 ----
    }
    if(!ds){        
!       fprintf(stderr,"dump: FATAL: selected stream missing!\n");
        exit(1);
    }
***************
*** 995,999 ****
    // let's dump it!
    f=fopen(stream_dump_name?stream_dump_name:"stream.dump","wb");
!   if(!f){ printf("Can't open dump file!!!\n");exit(1); }
    while(!ds->eof){
      unsigned char* start;
--- 995,999 ----
    // let's dump it!
    f=fopen(stream_dump_name?stream_dump_name:"stream.dump","wb");
!   if(!f){ fprintf(stderr,"Can't open dump file!!!\n");exit(1); }
    while(!ds->eof){
      unsigned char* start;
***************
*** 1028,1032 ****
        if(!i || !skip_video_packet(d_video)){
          if(verbose)  printf("NONE :(\n");
!         printf("MPEG: FATAL: EOF while searching for sequence header\n");
          GUI_MSG( mplMPEGErrorSeqHeaderSearch )
          exit(1);
--- 1028,1032 ----
        if(!i || !skip_video_packet(d_video)){
          if(verbose)  printf("NONE :(\n");
!         fprintf(stderr,"MPEG: FATAL: EOF while searching for sequence header\n");
          GUI_MSG( mplMPEGErrorSeqHeaderSearch )
          exit(1);
***************
*** 1040,1044 ****
     videobuffer=shmem_alloc(VIDEOBUFFER_SIZE);
     if(!videobuffer){ 
!      printf("Cannot allocate shared memory\n");
       GUI_MSG( mplErrorShMemAlloc )
       exit(0);
--- 1040,1044 ----
     videobuffer=shmem_alloc(VIDEOBUFFER_SIZE);
     if(!videobuffer){ 
!      fprintf(stderr,"Cannot allocate shared memory\n");
       GUI_MSG( mplErrorShMemAlloc )
       exit(0);
***************
*** 1046,1050 ****
     videobuf_len=0;
     if(!read_video_packet(d_video)){ 
!      printf("FATAL: Cannot read sequence header!\n");
       GUI_MSG( mplMPEGErrorCannotReadSeqHeader )
       exit(1);
--- 1046,1050 ----
     videobuf_len=0;
     if(!read_video_packet(d_video)){ 
!      fprintf(stderr,"FATAL: Cannot read sequence header!\n");
       GUI_MSG( mplMPEGErrorCannotReadSeqHeader )
       exit(1);
***************
*** 1058,1062 ****
      videobuf_len=0;
      if(!read_video_packet(d_video)){ 
!       printf("FATAL: Cannot read sequence header extension!\n");
        GUI_MSG( mplMPEGErrorCannotReadSeqHeaderExt )
        exit(1);
--- 1058,1062 ----
      videobuf_len=0;
      if(!read_video_packet(d_video)){ 
!       fprintf(stderr,"FATAL: Cannot read sequence header extension!\n");
        GUI_MSG( mplMPEGErrorCannotReadSeqHeaderExt )
        exit(1);
***************
*** 1072,1076 ****
     if(!sh_video->fps){
       if(!force_fps){
!        printf("FPS not specified (or invalid) in the header! Use the -fps option!\n");
         exit(1);
       }
--- 1072,1076 ----
     if(!sh_video->fps){
       if(!force_fps){
!        fprintf(stderr,"FPS not specified (or invalid) in the header! Use the -fps option!\n");
         exit(1);
       }
***************
*** 1105,1109 ****
  
  if(!sh_video){
!     printf("Sorry, no video stream... it's unplayable yet\n");
      exit(1);
  }
--- 1105,1109 ----
  
  if(!sh_video){
!     fprintf(stderr,"Sorry, no video stream... it's unplayable yet\n");
      exit(1);
  }
***************
*** 1177,1181 ****
  }
  if(i>=CODECS_MAX_OUTFMT){
!     printf("Sorry, selected video_out device is incompatible with this codec.\n");
      GUI_MSG( mplIncompatibleVideoOutDevice )
      exit(1);
--- 1177,1181 ----
  }
  if(i>=CODECS_MAX_OUTFMT){
!     fprintf(stderr,"Sorry, selected video_out device is incompatible with this codec.\n");
      GUI_MSG( mplIncompatibleVideoOutDevice )
      exit(1);
***************
*** 1204,1208 ****
   case 4: { // Win32/DirectShow
  #ifndef USE_DIRECTSHOW
!    printf("MPlayer was compiled WITHOUT directshow support!\n");
     GUI_MSG( mplCompileWithoutDSSupport )
     exit(1);
--- 1204,1208 ----
   case 4: { // Win32/DirectShow
  #ifndef USE_DIRECTSHOW
!    fprintf(stderr,"MPlayer was compiled WITHOUT directshow support!\n");
     GUI_MSG( mplCompileWithoutDSSupport )
     exit(1);
***************
*** 1302,1311 ****
       if(encode_file){
         fclose(encode_file);
!        printf("File already exists: %s (don't overwrite your favourite AVI!)\n",encode_name);
         return 0;
       }
       encode_file=fopen(encode_name,"wb");
       if(!encode_file){
!        printf("Cannot create file for encoding\n");
         return 0;
       }
--- 1302,1311 ----
       if(encode_file){
         fclose(encode_file);
!        fprintf(stderr,"File already exists: %s (don't overwrite your favourite AVI!)\n",encode_name);
         return 0;
       }
       encode_file=fopen(encode_name,"wb");
       if(!encode_file){
!        fprintf(stderr,"Cannot create file for encoding\n");
         return 0;
       }
***************
*** 1388,1392 ****
                        fullscreen|(vidmode<<1)|(softzoom<<2)|(flip<<3),
                        title,out_fmt)){
!      printf("FATAL: Cannot initialize video driver!\n");
       GUI_MSG( mplCantInitVideoDriver )
       exit(1);
--- 1388,1392 ----
                        fullscreen|(vidmode<<1)|(softzoom<<2)|(flip<<3),
                        title,out_fmt)){
!      fprintf(stderr,"FATAL: Cannot initialize video driver!\n");
       GUI_MSG( mplCantInitVideoDriver )
       exit(1);


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list