tell the codec wrapper the codec path (fixes realaudio Sipr)

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7753 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-10-16 15:59:04 +00:00
parent bcc4c6b1ae
commit 3cfed8bdb5
1 changed files with 13 additions and 3 deletions

View File

@ -41,7 +41,7 @@ static void* (*raGetFlavorProperty)(void*,unsigned long,unsigned long,in
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,16 +77,26 @@ static int preinit(sh_audio_t *sh){
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);
if(result){
mp_msg(MSGT_DECAUDIO,MSGL_WARN,"Decoder open failed, error code: 0x%X\n",result);