[Mplayer-cvslog] CVS: main/libmpcodecs ad_real.c,1.10,1.11

Arpi of Ize arpi at mplayerhq.hu
Sun Aug 25 03:12:51 CEST 2002


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

Modified Files:
	ad_real.c 
Log Message:
support for 'sipr' codec - descrambling/reorder not yet fixed.
FIXME: you must have dspr.so in the library path... ie /usr/local/lib/


Index: ad_real.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ad_real.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ad_real.c	17 Jul 2002 23:28:37 -0000	1.10
+++ ad_real.c	25 Aug 2002 01:12:41 -0000	1.11
@@ -43,6 +43,7 @@
 static unsigned long (*raOpenCodec2)(unsigned long);
 static unsigned long (*raSetFlavor)(unsigned long,unsigned long);
 static void  (*raSetDLLAccessPath)(unsigned long);
+static void  (*raSetPwd)(char*,char*);
 
 typedef struct {
     int samplerate;
@@ -78,6 +79,7 @@
     raInitDecoder = dlsym(handle, "RAInitDecoder");
     raSetFlavor = dlsym(handle, "RASetFlavor");
     raSetDLLAccessPath = dlsym(handle, "SetDLLAccessPath");
+    raSetPwd = dlsym(handle, "RASetPwd"); // optional, used by SIPR
     
   if(!raCloseCodec || !raDecode || !raFlush || !raFreeDecoder ||
      !raGetFlavorProperty || !raOpenCodec2 || !raSetFlavor ||
@@ -112,6 +114,11 @@
       return 0;
     }
   }
+
+    if(raSetPwd){
+	// used by 'SIPR'
+	raSetPwd(sh->context,"Ardubancel Quazanga"); // set password... lol.
+    }
   
     result=raSetFlavor(sh->context,((short*)(sh->wf+1))[2]);
     if(result){
@@ -155,8 +162,10 @@
   int result;
   int len=-1;
   int sps=((short*)(sh->wf+1))[0];
-  int w=sh->wf->nBlockAlign/sps; // 5
+  int w=sh->wf->nBlockAlign; // 5
   int h=((short*)(sh->wf+1))[1];
+  
+  if(sps) w/=sps; else sps=1;
   
 //  printf("bs=%d  sps=%d  w=%d h=%d \n",sh->wf->nBlockAlign,sps,w,h);
 




More information about the MPlayer-cvslog mailing list