# HG changeset patch # User arpi # Date 1034783944 0 # Node ID 18f8233094da782d9919c6898c0156c2d85e74dd # Parent 27c9c440536f60c730f9dc047ea805c92c51ccb0 tell the codec wrapper the codec path (fixes realaudio Sipr) diff -r 27c9c440536f -r 18f8233094da libmpcodecs/ad_realaud.c --- a/libmpcodecs/ad_realaud.c Wed Oct 16 15:35:28 2002 +0000 +++ b/libmpcodecs/ad_realaud.c Wed Oct 16 15:59:04 2002 +0000 @@ -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,16 +77,26 @@ 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);