[Mplayer-cvslog] CVS: main mplayer.c,1.58,1.59

GEREOFFY arpi_esp at users.sourceforge.net
Sat Apr 14 20:09:48 CEST 2001


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

Modified Files:
	mplayer.c 
Log Message:
more sh_audio/sh_video cleanup, removed has_video

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -r1.58 -r1.59
*** mplayer.c	2001/04/14 17:19:50	1.58
--- mplayer.c	2001/04/14 18:09:46	1.59
***************
*** 360,365 ****
  stream_t* stream=NULL;
  int file_format=DEMUXER_TYPE_UNKNOWN;
! int has_audio=1; // audio  0=no 1=mpeg 2=pcm 3=ac3 4=ACM 5=alaw 6=msgsm 7=DShow
! int has_video=1; // video  0=no 1=mpeg 2=win32/VfW 3=OpenDivX 4=w32/DShow
  //
  int audio_format=0; // override
--- 360,365 ----
  stream_t* stream=NULL;
  int file_format=DEMUXER_TYPE_UNKNOWN;
! int has_audio=1;
! //int has_video=1;
  //
  int audio_format=0; // override
***************
*** 821,827 ****
  if(has_audio){
    if(verbose) printf("Initializing audio codec...\n");
!   has_audio=init_audio(sh_audio);
!   if(!has_audio){
      printf("Couldn't initialize audio codec! -> nosound\n");
    } else {
      printf("AUDIO: samplerate=%d  channels=%d  bps=%d\n",sh_audio->samplerate,sh_audio->channels,sh_audio->samplesize);
--- 821,827 ----
  if(has_audio){
    if(verbose) printf("Initializing audio codec...\n");
!   if(!init_audio(sh_audio)){
      printf("Couldn't initialize audio codec! -> nosound\n");
+     has_audio=0;
    } else {
      printf("AUDIO: samplerate=%d  channels=%d  bps=%d\n",sh_audio->samplerate,sh_audio->channels,sh_audio->samplesize);
***************
*** 837,841 ****
      exit(1);
  }
! has_video=sh_video->codec->driver;
  
  printf("Found video codec: [%s] drv:%d (%s)\n",sh_video->codec->name,sh_video->codec->driver,sh_video->codec->info);
--- 837,841 ----
      exit(1);
  }
! //has_video=sh_video->codec->driver;
  
  printf("Found video codec: [%s] drv:%d (%s)\n",sh_video->codec->name,sh_video->codec->driver,sh_video->codec->info);
***************
*** 851,855 ****
  sh_video->outfmtidx=i;
  
! switch(has_video){
   case 2: {
     if(!init_video_codec(out_fmt)) exit(1);
--- 851,855 ----
  sh_video->outfmtidx=i;
  
! switch(sh_video->codec->driver){
   case 2: {
     if(!init_video_codec(out_fmt)) exit(1);
***************
*** 1177,1181 ****
    unsigned int t=GetTimer();
    current_module="decode_audio";   // Enter AUDIO decoder module
!   sh_audio->codec->driver=has_audio; // FIXME!
    while(sh_audio->a_buffer_len<OUTBURST && !d_audio->eof){
      int ret=decode_audio(sh_audio,&sh_audio->a_buffer[sh_audio->a_buffer_len],sh_audio->a_buffer_size-sh_audio->a_buffer_len);
--- 1177,1181 ----
    unsigned int t=GetTimer();
    current_module="decode_audio";   // Enter AUDIO decoder module
!   //sh_audio->codec->driver=has_audio; // FIXME!
    while(sh_audio->a_buffer_len<OUTBURST && !d_audio->eof){
      int ret=decode_audio(sh_audio,&sh_audio->a_buffer[sh_audio->a_buffer_len],sh_audio->a_buffer_size-sh_audio->a_buffer_len);
***************
*** 1261,1265 ****
  
    //--------------------  Decode a frame: -----------------------
! switch(has_video){
    case 3: {
      // OpenDivX
--- 1261,1265 ----
  
    //--------------------  Decode a frame: -----------------------
! switch(sh_video->codec->driver){
    case 3: {
      // OpenDivX
***************
*** 1765,1769 ****
          current_module="resync_audio";
  
!         switch(has_audio){
          case 1:
            MP3_DecodeFrame(NULL,-2); // resync
--- 1765,1769 ----
          current_module="resync_audio";
  
!         switch(sh_audio->codec->driver){
          case 1:
            MP3_DecodeFrame(NULL,-2); // resync
***************
*** 1790,1794 ****
            } else {
              while(d_video->pts > d_audio->pts){
!               switch(has_audio){
                  case 1: MP3_DecodeFrame(NULL,-2);break; // skip MPEG frame
                  case 3: sh_audio->ac3_frame=ac3_decode_frame();break; // skip AC3 frame
--- 1790,1794 ----
            } else {
              while(d_video->pts > d_audio->pts){
!               switch(sh_audio->codec->driver){
                  case 1: MP3_DecodeFrame(NULL,-2);break; // skip MPEG frame
                  case 3: sh_audio->ac3_frame=ac3_decode_frame();break; // skip AC3 frame


_______________________________________________
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