[Mplayer-cvslog] CVS: main/libmpcodecs ad_realaud.c,1.21,1.22

Roberto Togni CVS rtognimp at mplayerhq.hu
Wed Apr 30 21:46:00 CEST 2003


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv31585

Modified Files:
	ad_realaud.c 
Log Message:
Support for codec 14_4 and 28_8

Index: ad_realaud.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ad_realaud.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- ad_realaud.c	9 Mar 2003 17:17:39 -0000	1.21
+++ ad_realaud.c	30 Apr 2003 19:45:34 -0000	1.22
@@ -136,7 +136,7 @@
     raSetDLLAccessPath = dlsym(handle, "SetDLLAccessPath");
     raSetPwd = dlsym(handle, "RASetPwd"); // optional, used by SIPR
     
-    if (raCloseCodec && raDecode && raFlush && raFreeDecoder &&
+    if (raCloseCodec && raDecode && /*raFlush && */raFreeDecoder &&
 	raGetFlavorProperty && (raOpenCodec||raOpenCodec2) && raSetFlavor &&
 	/*raSetDLLAccessPath &&*/ raInitDecoder)
     {
@@ -398,12 +398,26 @@
   int sps=((short*)(sh->wf+1))[0];
   int w=sh->wf->nBlockAlign; // 5
   int h=((short*)(sh->wf+1))[1];
+  int cfs=((short*)(sh->wf+1))[3];
 
 //  printf("bs=%d  sps=%d  w=%d h=%d \n",sh->wf->nBlockAlign,sps,w,h);
   
 #if 1
   if(sh->a_in_buffer_len<=0){
       // fill the buffer!
+		if (sh->format == mmioFOURCC('1','4','_','4')) {
+			demux_read_data(sh->ds, sh->a_in_buffer, sh->wf->nBlockAlign);
+			sh->a_in_buffer_size=
+			sh->a_in_buffer_len=sh->wf->nBlockAlign;
+		} else
+		if (sh->format == mmioFOURCC('2','8','_','8')) {
+			int i,j;
+			for (j = 0; j < h; j++)
+				for (i = 0; i < h/2; i++)
+					demux_read_data(sh->ds, sh->a_in_buffer+i*2*w+j*cfs, cfs);
+			sh->a_in_buffer_size=
+			sh->a_in_buffer_len=sh->wf->nBlockAlign*h;
+		} else
     if(!sps){
       // 'sipr' way
       int j,n;



More information about the MPlayer-cvslog mailing list