[Mplayer-cvslog] CVS: main/libmpcodecs ad_realaud.c,1.17,1.18

Arpi of Ize arpi at mplayerhq.hu
Wed Oct 16 17:59:07 CEST 2002


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

Modified Files:
	ad_realaud.c 
Log Message:
tell the codec wrapper the codec path (fixes realaudio Sipr)


Index: ad_realaud.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ad_realaud.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- ad_realaud.c	29 Sep 2002 19:19:31 -0000	1.17
+++ ad_realaud.c	16 Oct 2002 15:59:04 -0000	1.18
@@ -41,7 +41,7 @@
 static unsigned long (*raInitDecoder)(void*, void*);
 static unsigned long (*raOpenCodec2)(void*);
 static unsigned long (*raSetFlavor)(void*,unsigned long);
-//static void  (*raSetDLLAccessPath)(unsigned long);
+static void  (*raSetDLLAccessPath)(char*);
 static void  (*raSetPwd)(char*,char*);
 
 typedef struct {
@@ -77,14 +77,24 @@
     raOpenCodec2 = dlsym(handle, "RAOpenCodec2");
     raInitDecoder = dlsym(handle, "RAInitDecoder");
     raSetFlavor = dlsym(handle, "RASetFlavor");
-//    raSetDLLAccessPath = dlsym(handle, "SetDLLAccessPath");
+    raSetDLLAccessPath = dlsym(handle, "SetDLLAccessPath");
     raSetPwd = dlsym(handle, "RASetPwd"); // optional, used by SIPR
     
   if(!raCloseCodec || !raDecode || !raFlush || !raFreeDecoder ||
      !raGetFlavorProperty || !raOpenCodec2 || !raSetFlavor ||
      /*!raSetDLLAccessPath ||*/ !raInitDecoder){
-      mp_msg(MSGT_DECAUDIO,MSGL_WARN,"Cannot resolve symbols - incompatible dll\n");
+      mp_msg(MSGT_DECAUDIO,MSGL_WARN,"Cannot resolve symbols - incompatible dll: %s\n",path);
       return 0;
+  }
+
+  if(raSetDLLAccessPath){
+      sprintf(path, "DT_Codecs=" REALCODEC_PATH);
+      if(path[strlen(path)-1]!='/'){
+        path[strlen(path)+1]=0;
+        path[strlen(path)]='/';
+      }
+      path[strlen(path)+1]=0;
+      raSetDLLAccessPath(path);
   }
 
     result=raOpenCodec2(&sh->context);




More information about the MPlayer-cvslog mailing list