[Mplayer-cvslog] CVS: main asfheader.c,1.5,1.6 aviheader.c,1.3,1.4 dec_audio.c,1.5,1.6 dll_init.c,1.7,1.8 mplayer.c,1.62,1.63 stheader.h,1.5,1.6

GEREOFFY arpi_esp at users.sourceforge.net
Sun Apr 15 16:33:52 CEST 2001


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

Modified Files:
	asfheader.c aviheader.c dec_audio.c dll_init.c mplayer.c 
	stheader.h 
Log Message:
sh_audio->wf and sh_video->bih changed to dynamic (thanx to Jens Hoffmann)

Index: asfheader.c
===================================================================
RCS file: /cvsroot/mplayer/main/asfheader.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** asfheader.c	2001/04/15 03:40:37	1.5
--- asfheader.c	2001/04/15 14:33:49	1.6
***************
*** 130,135 ****
        case 0xF8699E40: { // guid_audio_stream
          sh_audio_t* sh_audio=new_sh_audio(streamh.stream_no & 0x7F);
!         memcpy(&sh_audio->wf,buffer,streamh.type_size<64?streamh.type_size:64);
!         if(verbose>=1) print_wave_header((WAVEFORMATEX*)buffer);
  	if((*((unsigned int*)&streamh.concealment))==0xbfc3cd50){
            stream_read(demuxer->stream,(char*) buffer,streamh.stream_size);
--- 130,136 ----
        case 0xF8699E40: { // guid_audio_stream
          sh_audio_t* sh_audio=new_sh_audio(streamh.stream_no & 0x7F);
!         sh_audio->wf=calloc((streamh.type_size<sizeof(WAVEFORMATEX))?sizeof(WAVEFORMATEX):streamh.type_size,1);
!         memcpy(sh_audio->wf,buffer,streamh.type_size);
!         if(verbose>=1) print_wave_header(sh_audio->wf);
  	if((*((unsigned int*)&streamh.concealment))==0xbfc3cd50){
            stream_read(demuxer->stream,(char*) buffer,streamh.stream_size);
***************
*** 147,154 ****
        case 0xBC19EFC0: { // guid_video_stream
          sh_video_t* sh_video=new_sh_video(streamh.stream_no & 0x7F);
!         memcpy(&sh_video->bih,&buffer[4+4+1+2],sizeof(BITMAPINFOHEADER));
          //sh_video->fps=(float)sh_video->video.dwRate/(float)sh_video->video.dwScale;
          //sh_video->frametime=(float)sh_video->video.dwScale/(float)sh_video->video.dwRate;
!         if(verbose>=1) print_video_header((BITMAPINFOHEADER*)&buffer[4+4+1+2]);
          //asf_video_id=streamh.stream_no & 0x7F;
  	//if(demuxer->video->id==-1) demuxer->video->id=streamh.stream_no & 0x7F;
--- 148,158 ----
        case 0xBC19EFC0: { // guid_video_stream
          sh_video_t* sh_video=new_sh_video(streamh.stream_no & 0x7F);
!         int len=streamh.type_size-(4+4+1+2);
! //        sh_video->bih=malloc(chunksize); memset(sh_video->bih,0,chunksize);
!         sh_video->bih=calloc((len<sizeof(BITMAPINFOHEADER))?sizeof(BITMAPINFOHEADER):len,1);
!         memcpy(sh_video->bih,&buffer[4+4+1+2],len);
          //sh_video->fps=(float)sh_video->video.dwRate/(float)sh_video->video.dwScale;
          //sh_video->frametime=(float)sh_video->video.dwScale/(float)sh_video->video.dwRate;
!         if(verbose>=1) print_video_header(sh_video->bih);
          //asf_video_id=streamh.stream_no & 0x7F;
  	//if(demuxer->video->id==-1) demuxer->video->id=streamh.stream_no & 0x7F;

Index: aviheader.c
===================================================================
RCS file: /cvsroot/mplayer/main/aviheader.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** aviheader.c	2001/04/15 03:40:37	1.3
--- aviheader.c	2001/04/15 14:33:49	1.4
***************
*** 57,72 ****
      case ckidSTREAMFORMAT: {      // read 'strf'
        if(last_fccType==streamtypeVIDEO){
!         stream_read(demuxer->stream,(char*) &sh_video->bih,MIN(size2,sizeof(sh_video->bih)));
!         chunksize-=MIN(size2,sizeof(sh_video->bih));
!         sh_video->fps=(float)sh_video->video.dwRate/(float)sh_video->video.dwScale;
!         sh_video->frametime=(float)sh_video->video.dwScale/(float)sh_video->video.dwRate;
  //        if(demuxer->video->id==-1) demuxer->video->id=stream_id;
        } else
        if(last_fccType==streamtypeAUDIO){
!         int z=(chunksize<64)?chunksize:64;
          if(verbose>=2) printf("found 'wf', %d bytes of %d\n",chunksize,sizeof(WAVEFORMATEX));
!         stream_read(demuxer->stream,(char*) &sh_audio->wf,z);
!         chunksize-=z;
!         if(verbose>=1) print_wave_header(&sh_audio->wf);
  //        if(demuxer->audio->id==-1) demuxer->audio->id=stream_id;
        }
--- 57,74 ----
      case ckidSTREAMFORMAT: {      // read 'strf'
        if(last_fccType==streamtypeVIDEO){
!         sh_video->bih=malloc(chunksize); memset(sh_video->bih,0,chunksize);
!         if(verbose>=2) printf("found 'bih', %d bytes of %d\n",chunksize,sizeof(BITMAPINFOHEADER));
!         stream_read(demuxer->stream,(char*) sh_video->bih,chunksize);
!         chunksize=0;
! //        sh_video->fps=(float)sh_video->video.dwRate/(float)sh_video->video.dwScale;
! //        sh_video->frametime=(float)sh_video->video.dwScale/(float)sh_video->video.dwRate;
  //        if(demuxer->video->id==-1) demuxer->video->id=stream_id;
        } else
        if(last_fccType==streamtypeAUDIO){
!         sh_audio->wf=malloc(chunksize); memset(sh_audio->wf,0,chunksize);
          if(verbose>=2) printf("found 'wf', %d bytes of %d\n",chunksize,sizeof(WAVEFORMATEX));
!         stream_read(demuxer->stream,(char*) sh_audio->wf,chunksize);
!         chunksize=0;
!         if(verbose>=1) print_wave_header(sh_audio->wf);
  //        if(demuxer->audio->id==-1) demuxer->audio->id=stream_id;
        }

Index: dec_audio.c
===================================================================
RCS file: /cvsroot/mplayer/main/dec_audio.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** dec_audio.c	2001/04/14 15:25:10	1.5
--- dec_audio.c	2001/04/15 14:33:49	1.6
***************
*** 32,42 ****
  //  printf("DShow_audio: channs=%d  rate=%d\n",sh_audio->channels,sh_audio->samplerate);
  
!   if(DS_AudioDecoder_Open(sh_audio->codec->dll,&sh_audio->codec->guid,&sh_audio->wf)){
      printf("ERROR: Could not load/initialize Win32/DirctShow AUDIO codec: %s\n",sh_audio->codec->dll);
      driver=0;
    } else {
!     sh_audio->channels=sh_audio->wf.nChannels;
!     sh_audio->samplerate=sh_audio->wf.nSamplesPerSec;
!     sh_audio->audio_in_minsize=2*sh_audio->wf.nBlockAlign;
      if(sh_audio->audio_in_minsize<8192) sh_audio->audio_in_minsize=8192;
      sh_audio->a_in_buffer_size=sh_audio->audio_in_minsize;
--- 32,42 ----
  //  printf("DShow_audio: channs=%d  rate=%d\n",sh_audio->channels,sh_audio->samplerate);
  
!   if(DS_AudioDecoder_Open(sh_audio->codec->dll,&sh_audio->codec->guid,sh_audio->wf)){
      printf("ERROR: Could not load/initialize Win32/DirctShow AUDIO codec: %s\n",sh_audio->codec->dll);
      driver=0;
    } else {
!     sh_audio->channels=sh_audio->wf->nChannels;
!     sh_audio->samplerate=sh_audio->wf->nSamplesPerSec;
!     sh_audio->audio_in_minsize=2*sh_audio->wf->nBlockAlign;
      if(sh_audio->audio_in_minsize<8192) sh_audio->audio_in_minsize=8192;
      sh_audio->a_in_buffer_size=sh_audio->audio_in_minsize;
***************
*** 65,69 ****
  case 2: {
      // AVI PCM Audio:
!     WAVEFORMATEX *h=&sh_audio->wf;
      sh_audio->channels=h->nChannels;
      sh_audio->samplerate=h->nSamplesPerSec;
--- 65,69 ----
  case 2: {
      // AVI PCM Audio:
!     WAVEFORMATEX *h=sh_audio->wf;
      sh_audio->channels=h->nChannels;
      sh_audio->samplerate=h->nSamplesPerSec;
***************
*** 102,107 ****
    // aLaw audio codec:
    Gen_aLaw_2_Signed(); // init table
!   sh_audio->channels=sh_audio->wf.nChannels;
!   sh_audio->samplerate=sh_audio->wf.nSamplesPerSec;
    break;
  }
--- 102,107 ----
    // aLaw audio codec:
    Gen_aLaw_2_Signed(); // init table
!   sh_audio->channels=sh_audio->wf->nChannels;
!   sh_audio->samplerate=sh_audio->wf->nSamplesPerSec;
    break;
  }
***************
*** 109,114 ****
    // MS-GSM audio codec:
    GSM_Init();
!   sh_audio->channels=sh_audio->wf.nChannels;
!   sh_audio->samplerate=sh_audio->wf.nSamplesPerSec;
    break;
  }
--- 109,114 ----
    // MS-GSM audio codec:
    GSM_Init();
!   sh_audio->channels=sh_audio->wf->nChannels;
!   sh_audio->samplerate=sh_audio->wf->nSamplesPerSec;
    break;
  }

Index: dll_init.c
===================================================================
RCS file: /cvsroot/mplayer/main/dll_init.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** dll_init.c	2001/04/14 19:30:52	1.7
--- dll_init.c	2001/04/15 14:33:49	1.8
***************
*** 4,8 ****
  int init_acm_audio_codec(sh_audio_t *sh_audio){
      HRESULT ret;
!     WAVEFORMATEX *in_fmt=&sh_audio->wf;
      unsigned long srcsize=0;
  
--- 4,8 ----
  int init_acm_audio_codec(sh_audio_t *sh_audio){
      HRESULT ret;
!     WAVEFORMATEX *in_fmt=sh_audio->wf;
      unsigned long srcsize=0;
  
***************
*** 111,115 ****
  
    win32_codec_name = sh_video->codec->dll;
!   sh_video->hic = ICOpen( 0x63646976, sh_video->bih.biCompression, ICMODE_FASTDECOMPRESS);
  //  sh_video->hic = ICOpen( 0x63646976, sh_video->bih.biCompression, ICMODE_DECOMPRESS);
    if(!sh_video->hic){
--- 111,115 ----
  
    win32_codec_name = sh_video->codec->dll;
!   sh_video->hic = ICOpen( 0x63646976, sh_video->bih->biCompression, ICMODE_FASTDECOMPRESS);
  //  sh_video->hic = ICOpen( 0x63646976, sh_video->bih.biCompression, ICMODE_DECOMPRESS);
    if(!sh_video->hic){
***************
*** 120,124 ****
  //  sh_video->bih.biBitCount=32;
  
!   ret = ICDecompressGetFormat(sh_video->hic, &sh_video->bih, &sh_video->o_bih);
    if(ret){
      printf("ICDecompressGetFormat failed: Error %d\n", ret);
--- 120,124 ----
  //  sh_video->bih.biBitCount=32;
  
!   ret = ICDecompressGetFormat(sh_video->hic, sh_video->bih, &sh_video->o_bih);
    if(ret){
      printf("ICDecompressGetFormat failed: Error %d\n", ret);
***************
*** 186,190 ****
  
    if(!(sh_video->codec->outflags[sh_video->outfmtidx]&CODECS_FLAG_FLIP)) {
!       sh_video->o_bih.biHeight=-sh_video->bih.biHeight; // flip image!
    }
  
--- 186,190 ----
  
    if(!(sh_video->codec->outflags[sh_video->outfmtidx]&CODECS_FLAG_FLIP)) {
!       sh_video->o_bih.biHeight=-sh_video->bih->biHeight; // flip image!
    }
  
***************
*** 197,207 ****
    if(verbose) {
      printf("Starting decompression, format:\n");
! 	printf("  biSize %d\n", sh_video->bih.biSize);
! 	printf("  biWidth %d\n", sh_video->bih.biWidth);
! 	printf("  biHeight %d\n", sh_video->bih.biHeight);
! 	printf("  biPlanes %d\n", sh_video->bih.biPlanes);
! 	printf("  biBitCount %d\n", sh_video->bih.biBitCount);
! 	printf("  biCompression 0x%x ('%.4s')\n", sh_video->bih.biCompression, &sh_video->bih.biCompression);
! 	printf("  biSizeImage %d\n", sh_video->bih.biSizeImage);
      printf("Dest fmt:\n");
  	printf("  biSize %d\n", sh_video->o_bih.biSize);
--- 197,207 ----
    if(verbose) {
      printf("Starting decompression, format:\n");
! 	printf("  biSize %d\n", sh_video->bih->biSize);
! 	printf("  biWidth %d\n", sh_video->bih->biWidth);
! 	printf("  biHeight %d\n", sh_video->bih->biHeight);
! 	printf("  biPlanes %d\n", sh_video->bih->biPlanes);
! 	printf("  biBitCount %d\n", sh_video->bih->biBitCount);
! 	printf("  biCompression 0x%x ('%.4s')\n", sh_video->bih->biCompression, &sh_video->bih->biCompression);
! 	printf("  biSizeImage %d\n", sh_video->bih->biSizeImage);
      printf("Dest fmt:\n");
  	printf("  biSize %d\n", sh_video->o_bih.biSize);
***************
*** 214,218 ****
    }
  
!   ret = ICDecompressQuery(sh_video->hic, &sh_video->bih, &sh_video->o_bih);
    if(ret){
      printf("ICDecompressQuery failed: Error %d\n", ret);
--- 214,218 ----
    }
  
!   ret = ICDecompressQuery(sh_video->hic, sh_video->bih, &sh_video->o_bih);
    if(ret){
      printf("ICDecompressQuery failed: Error %d\n", ret);
***************
*** 222,226 ****
  
    
!   ret = ICDecompressBegin(sh_video->hic, &sh_video->bih, &sh_video->o_bih);
    if(ret){
      printf("ICDecompressBegin failed: Error %d\n", ret);
--- 222,226 ----
  
    
!   ret = ICDecompressBegin(sh_video->hic, sh_video->bih, &sh_video->o_bih);
    if(ret){
      printf("ICDecompressBegin failed: Error %d\n", ret);

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -r1.62 -r1.63
*** mplayer.c	2001/04/15 13:57:06	1.62
--- mplayer.c	2001/04/15 14:33:49	1.63
***************
*** 698,702 ****
      } else {
        sh_audio=d_audio->sh;sh_audio->ds=d_audio;
!       sh_audio->format=sh_audio->wf.wFormatTag;
      }
    }
--- 698,702 ----
      } else {
        sh_audio=d_audio->sh;sh_audio->ds=d_audio;
!       sh_audio->format=sh_audio->wf->wFormatTag;
      }
    }
***************
*** 710,717 ****
    avi_header.bitrate=((float)avi_header.bitrate/(float)sh_video->video.dwLength)*sh_video->fps;
    printf("VIDEO:  [%.4s]  %dx%d  %dbpp  %4.2f fps  %5.1f kbps (%4.1f kbyte/s)\n",
!     &sh_video->bih.biCompression,
!     sh_video->bih.biWidth,
!     sh_video->bih.biHeight,
!     sh_video->bih.biBitCount,
      sh_video->fps,
      avi_header.bitrate*0.008f,
--- 710,717 ----
    avi_header.bitrate=((float)avi_header.bitrate/(float)sh_video->video.dwLength)*sh_video->fps;
    printf("VIDEO:  [%.4s]  %dx%d  %dbpp  %4.2f fps  %5.1f kbps (%4.1f kbyte/s)\n",
!     &sh_video->bih->biCompression,
!     sh_video->bih->biWidth,
!     sh_video->bih->biHeight,
!     sh_video->bih->biBitCount,
      sh_video->fps,
      avi_header.bitrate*0.008f,
***************
*** 739,751 ****
      } else {
        sh_audio=d_audio->sh;sh_audio->ds=d_audio;
!       sh_audio->format=sh_audio->wf.wFormatTag;
      }
    }
    sh_video->fps=1000.0f; sh_video->frametime=0.001f; // 1ms
    printf("VIDEO:  [%.4s]  %dx%d  %dbpp\n",
!     &sh_video->bih.biCompression,
!     sh_video->bih.biWidth,
!     sh_video->bih.biHeight,
!     sh_video->bih.biBitCount);
    break;
   }
--- 739,751 ----
      } else {
        sh_audio=d_audio->sh;sh_audio->ds=d_audio;
!       sh_audio->format=sh_audio->wf->wFormatTag;
      }
    }
    sh_video->fps=1000.0f; sh_video->frametime=0.001f; // 1ms
    printf("VIDEO:  [%.4s]  %dx%d  %dbpp\n",
!     &sh_video->bih->biCompression,
!     sh_video->bih->biWidth,
!     sh_video->bih->biHeight,
!     sh_video->bih->biBitCount);
    break;
   }
***************
*** 779,785 ****
   case DEMUXER_TYPE_ASF: {
    // display info:
!   sh_video->format=sh_video->bih.biCompression;
!   sh_video->disp_w=sh_video->bih.biWidth;
!   sh_video->disp_h=abs(sh_video->bih.biHeight);
    break;
   }
--- 779,785 ----
   case DEMUXER_TYPE_ASF: {
    // display info:
!   sh_video->format=sh_video->bih->biCompression;
!   sh_video->disp_w=sh_video->bih->biWidth;
!   sh_video->disp_h=abs(sh_video->bih->biHeight);
    break;
   }
***************
*** 869,873 ****
  
  // Go through the codec.conf and find the best codec...
! sh_video->codec=find_codec(sh_video->format,(unsigned int*) &sh_video->bih.biCompression,NULL,0);
  if(!sh_video->codec){
      printf("Can't find codec for video format 0x%X !\n",sh_video->format);
--- 869,873 ----
  
  // Go through the codec.conf and find the best codec...
! sh_video->codec=find_codec(sh_video->format,(unsigned int*) &sh_video->bih->biCompression,NULL,0);
  if(!sh_video->codec){
      printf("Can't find codec for video format 0x%X !\n",sh_video->format);
***************
*** 900,904 ****
  #else
     sh_video->our_out_buffer=NULL;
!    if(DS_VideoDecoder_Open(sh_video->codec->dll,&sh_video->codec->guid, &sh_video->bih, 0, &sh_video->our_out_buffer)){
          printf("ERROR: Couldn't open required DirectShow codec: %s\n",sh_video->codec->dll);
          printf("Maybe you forget to upgrade your win32 codecs?? It's time to download the new\n");
--- 900,904 ----
  #else
     sh_video->our_out_buffer=NULL;
!    if(DS_VideoDecoder_Open(sh_video->codec->dll,&sh_video->codec->guid, sh_video->bih, 0, &sh_video->our_out_buffer)){
          printf("ERROR: Couldn't open required DirectShow codec: %s\n",sh_video->codec->dll);
          printf("Maybe you forget to upgrade your win32 codecs?? It's time to download the new\n");
***************
*** 927,932 ****
     { DEC_PARAM dec_param;
       DEC_SET dec_set;
! 	dec_param.x_dim = sh_video->bih.biWidth;
! 	dec_param.y_dim = sh_video->bih.biHeight;
  	dec_param.color_depth = 32;
  	decore(0x123, DEC_OPT_INIT, &dec_param, NULL);
--- 927,932 ----
     { DEC_PARAM dec_param;
       DEC_SET dec_set;
! 	dec_param.x_dim = sh_video->bih->biWidth;
! 	dec_param.y_dim = sh_video->bih->biHeight;
  	dec_param.color_depth = 32;
  	decore(0x123, DEC_OPT_INIT, &dec_param, NULL);
***************
*** 1350,1360 ****
      if(in_size>max_framesize) max_framesize=in_size;
      
!       sh_video->bih.biSizeImage = in_size;
  //      ret = ICDecompress(avi_header.hic, ICDECOMPRESS_NOTKEYFRAME|(ICDECOMPRESS_HURRYUP|ICDECOMPRESS_PREROL), 
        ret = ICDecompress(sh_video->hic, ICDECOMPRESS_NOTKEYFRAME, 
!                         &sh_video->bih,   start,
                          &sh_video->o_bih, sh_video->our_out_buffer);
        if(ret){ printf("Error decompressing frame, err=%d\n",ret);break; }
! 
        t2=GetTimer();t=t2-t;video_time_usage+=t*0.000001f;
          video_out->draw_frame((uint8_t **)&sh_video->our_out_buffer);
--- 1350,1361 ----
      if(in_size>max_framesize) max_framesize=in_size;
      
!     if(in_size){
!       sh_video->bih->biSizeImage = in_size;
  //      ret = ICDecompress(avi_header.hic, ICDECOMPRESS_NOTKEYFRAME|(ICDECOMPRESS_HURRYUP|ICDECOMPRESS_PREROL), 
        ret = ICDecompress(sh_video->hic, ICDECOMPRESS_NOTKEYFRAME, 
!                          sh_video->bih,   start,
                          &sh_video->o_bih, sh_video->our_out_buffer);
        if(ret){ printf("Error decompressing frame, err=%d\n",ret);break; }
!     }
        t2=GetTimer();t=t2-t;video_time_usage+=t*0.000001f;
          video_out->draw_frame((uint8_t **)&sh_video->our_out_buffer);
***************
*** 1449,1453 ****
      if(pts_from_bps && (file_format==DEMUXER_TYPE_AVI)){
  //      a_pts=(float)ds_tell(d_audio)/sh_audio->wf.nAvgBytesPerSec-(buffer_delay+audio_delay);
!       a_pts=(float)ds_tell(d_audio)/sh_audio->wf.nAvgBytesPerSec-(buffer_delay);
        delay_corrected=1; // hack
      } else
--- 1450,1454 ----
      if(pts_from_bps && (file_format==DEMUXER_TYPE_AVI)){
  //      a_pts=(float)ds_tell(d_audio)/sh_audio->wf.nAvgBytesPerSec-(buffer_delay+audio_delay);
!       a_pts=(float)ds_tell(d_audio)/sh_audio->wf->nAvgBytesPerSec-(buffer_delay);
        delay_corrected=1; // hack
      } else
***************
*** 1664,1674 ****
  
          // calc new audio position in audio stream: (using avg.bps value)
!         curr_audio_pos=(avi_video_pts) * sh_audio->wf.nAvgBytesPerSec;
          if(curr_audio_pos<0)curr_audio_pos=0;
  #if 1
          curr_audio_pos&=~15; // requires for PCM formats!!!
  #else
!         curr_audio_pos/=sh_audio->wf.nBlockAlign;
!         curr_audio_pos*=sh_audio->wf.nBlockAlign;
          avi_header.audio_seekable=1;
  #endif
--- 1665,1675 ----
  
          // calc new audio position in audio stream: (using avg.bps value)
!         curr_audio_pos=(avi_video_pts) * sh_audio->wf->nAvgBytesPerSec;
          if(curr_audio_pos<0)curr_audio_pos=0;
  #if 1
          curr_audio_pos&=~15; // requires for PCM formats!!!
  #else
!         curr_audio_pos/=sh_audio->wf->nBlockAlign;
!         curr_audio_pos*=sh_audio->wf->nBlockAlign;
          avi_header.audio_seekable=1;
  #endif
***************
*** 1706,1717 ****
  #if 0
  //             curr_audio_pos=apos; // selected audio codec can't seek in chunk
!              skip_audio_secs=(float)skip_audio_bytes/(float)sh_audio->wf.nAvgBytesPerSec;
               //printf("Seek_AUDIO: %d bytes --> %5.3f secs\n",skip_audio_bytes,skip_audio_secs);
               skip_audio_bytes=0;
  #else
!              int d=skip_audio_bytes % sh_audio->wf.nBlockAlign;
               skip_audio_bytes-=d;
  //             curr_audio_pos-=d;
!              skip_audio_secs=(float)d/(float)sh_audio->wf.nAvgBytesPerSec;
               //printf("Seek_AUDIO: %d bytes --> %5.3f secs\n",d,skip_audio_secs);
  #endif
--- 1707,1718 ----
  #if 0
  //             curr_audio_pos=apos; // selected audio codec can't seek in chunk
!              skip_audio_secs=(float)skip_audio_bytes/(float)sh_audio->wf->nAvgBytesPerSec;
               //printf("Seek_AUDIO: %d bytes --> %5.3f secs\n",skip_audio_bytes,skip_audio_secs);
               skip_audio_bytes=0;
  #else
!              int d=skip_audio_bytes % sh_audio->wf->nBlockAlign;
               skip_audio_bytes-=d;
  //             curr_audio_pos-=d;
!              skip_audio_secs=(float)d/(float)sh_audio->wf->nAvgBytesPerSec;
               //printf("Seek_AUDIO: %d bytes --> %5.3f secs\n",d,skip_audio_secs);
  #endif

Index: stheader.h
===================================================================
RCS file: /cvsroot/mplayer/main/stheader.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** stheader.h	2001/04/15 03:40:37	1.5
--- stheader.h	2001/04/15 14:33:49	1.6
***************
*** 27,32 ****
    // win32 codec stuff:
    AVIStreamHeader audio;
!   WAVEFORMATEX wf;
!   char wf_ext[64];     // in format
    WAVEFORMATEX o_wf;   // out format
    HACMSTREAM srcstream;  // handle
--- 27,32 ----
    // win32 codec stuff:
    AVIStreamHeader audio;
!   WAVEFORMATEX *wf;
! //  char wf_ext[64];     // in format
    WAVEFORMATEX o_wf;   // out format
    HACMSTREAM srcstream;  // handle
***************
*** 53,57 ****
    // win32 codec stuff:
    AVIStreamHeader video;
!   BITMAPINFOHEADER bih;   // in format
    BITMAPINFOHEADER o_bih; // out format
    HIC hic;  // handle
--- 53,57 ----
    // win32 codec stuff:
    AVIStreamHeader video;
!   BITMAPINFOHEADER *bih;   // in format
    BITMAPINFOHEADER o_bih; // out format
    HIC hic;  // handle


_______________________________________________
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