[Mplayer-cvslog] CVS: main dll_init.c,1.13,1.14

GEREOFFY arpi_esp at users.sourceforge.net
Wed Apr 25 03:27:32 CEST 2001


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

Modified Files:
	dll_init.c 
Log Message:
ACM fixes - now plays april_25.asf too

Index: dll_init.c
===================================================================
RCS file: /cvsroot/mplayer/main/dll_init.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** dll_init.c	2001/04/23 23:14:58	1.13
--- dll_init.c	2001/04/25 01:27:30	1.14
***************
*** 60,74 ****
      if(verbose) printf("Audio codec opened OK! ;-)\n");
  
!     srcsize=in_fmt->nBlockAlign;
!     acmStreamSize(sh_audio->srcstream, srcsize, &srcsize, ACM_STREAMSIZEF_SOURCE);
      if(srcsize<OUTBURST) srcsize=OUTBURST;
      sh_audio->audio_out_minsize=srcsize; // audio output min. size
      if(verbose) printf("Audio ACM output buffer min. size: %ld\n",srcsize);
  
!     acmStreamSize(sh_audio->srcstream, srcsize, &srcsize, ACM_STREAMSIZEF_DESTINATION);
      sh_audio->audio_in_minsize=srcsize; // audio input min. size
      if(verbose) printf("Audio ACM input buffer min. size: %ld\n",srcsize);
  
!     sh_audio->a_in_buffer_size=sh_audio->audio_in_minsize;
      sh_audio->a_in_buffer=malloc(sh_audio->a_in_buffer_size);
      sh_audio->a_in_buffer_len=0;
--- 60,75 ----
      if(verbose) printf("Audio codec opened OK! ;-)\n");
  
!     acmStreamSize(sh_audio->srcstream, in_fmt->nBlockAlign, &srcsize, ACM_STREAMSIZEF_SOURCE);
      if(srcsize<OUTBURST) srcsize=OUTBURST;
      sh_audio->audio_out_minsize=srcsize; // audio output min. size
      if(verbose) printf("Audio ACM output buffer min. size: %ld\n",srcsize);
  
!     acmStreamSize(sh_audio->srcstream, 2*srcsize, &srcsize, ACM_STREAMSIZEF_DESTINATION);
      sh_audio->audio_in_minsize=srcsize; // audio input min. size
      if(verbose) printf("Audio ACM input buffer min. size: %ld\n",srcsize);
+     
+     if(srcsize<in_fmt->nBlockAlign) srcsize=in_fmt->nBlockAlign;
  
!     sh_audio->a_in_buffer_size=2*sh_audio->audio_in_minsize;
      sh_audio->a_in_buffer=malloc(sh_audio->a_in_buffer_size);
      sh_audio->a_in_buffer_len=0;
***************
*** 90,93 ****
--- 91,95 ----
              srcsize-sh_audio->a_in_buffer_len);
          }
+         if(verbose>=3)printf("acm convert %d -> %d bytes\n",sh_audio->a_in_buffer_len,len);
          memset(&ash, 0, sizeof(ash));
          ash.cbStruct=sizeof(ash);
***************
*** 106,112 ****
          if(hr){
            printf("ACM_Decoder: acmStreamConvert error %d\n",(int)hr);
! 					return -1;
          }
!         //printf("ACM convert %d -> %d  (buf=%d)\n",ash.cbSrcLengthUsed,ash.cbDstLengthUsed,a_in_buffer_len);
          if(ash.cbSrcLengthUsed>=sh_audio->a_in_buffer_len){
            sh_audio->a_in_buffer_len=0;
--- 108,115 ----
          if(hr){
            printf("ACM_Decoder: acmStreamConvert error %d\n",(int)hr);
!           
! //					return -1;
          }
!         if(verbose>=3) printf("acm converted %d -> %d\n",ash.cbSrcLengthUsed,ash.cbDstLengthUsed);
          if(ash.cbSrcLengthUsed>=sh_audio->a_in_buffer_len){
            sh_audio->a_in_buffer_len=0;


_______________________________________________
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