diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-04-26 17:42:20 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-04-26 17:42:20 +0300 |
commit | 4785c2617ee9ac186464a55c1bfb13a5781ef041 (patch) | |
tree | 2424f18b68b2037bd4e290471821e9adae28b876 /libmpcodecs/ad_realaud.c | |
parent | 2732d5efbae3e0ee28bc6b70ceab1eb77e593216 (diff) | |
parent | 38abe6ff7a3810f8e01b6296570e92df1b12b09c (diff) | |
download | mpv-4785c2617ee9ac186464a55c1bfb13a5781ef041.tar.bz2 mpv-4785c2617ee9ac186464a55c1bfb13a5781ef041.tar.xz |
Merge svn changes up to r30967
Diffstat (limited to 'libmpcodecs/ad_realaud.c')
-rw-r--r-- | libmpcodecs/ad_realaud.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/libmpcodecs/ad_realaud.c b/libmpcodecs/ad_realaud.c index dd8b2947ec..0b7fb219f7 100644 --- a/libmpcodecs/ad_realaud.c +++ b/libmpcodecs/ad_realaud.c @@ -26,6 +26,7 @@ #ifdef HAVE_LIBDL #include <dlfcn.h> #endif +#include "path.h" #include "ad_internal.h" #include "loader/wine/windef.h" @@ -220,9 +221,9 @@ static int preinit(sh_audio_t *sh){ unsigned int result; char *path; - path = malloc(strlen(BINARY_CODECS_PATH) + strlen(sh->codec->dll) + 2); + path = malloc(strlen(codec_path) + strlen(sh->codec->dll) + 2); if (!path) return 0; - sprintf(path, BINARY_CODECS_PATH "/%s", sh->codec->dll); + sprintf(path, "%s/%s", codec_path, sh->codec->dll); /* first try to load linux dlls, if failed and we're supporting win32 dlls, then try to load the windows ones */ @@ -246,8 +247,8 @@ static int preinit(sh_audio_t *sh){ if(raSetDLLAccessPath){ #endif // used by 'SIPR' - path = realloc(path, strlen(BINARY_CODECS_PATH) + 13); - sprintf(path, "DT_Codecs=" BINARY_CODECS_PATH); + path = realloc(path, strlen(codec_path) + 13); + sprintf(path, "DT_Codecs=%s", codec_path); if(path[strlen(path)-1]!='/'){ path[strlen(path)+1]=0; path[strlen(path)]='/'; @@ -268,15 +269,17 @@ static int preinit(sh_audio_t *sh){ #ifdef CONFIG_WIN32DLL if (dll_type == 1){ - if(wraOpenCodec2) - result = wraOpenCodec2(&sh->context, BINARY_CODECS_PATH "\\"); - else + if (wraOpenCodec2) { + sprintf(path, "%s\\", codec_path); + result = wraOpenCodec2(&sh->context, path); + } else result=wraOpenCodec(&sh->context); } else #endif - if(raOpenCodec2) - result = raOpenCodec2(&sh->context, BINARY_CODECS_PATH "/"); - else + if (raOpenCodec2) { + sprintf(path, "%s/", codec_path); + result = raOpenCodec2(&sh->context, path); + } else result=raOpenCodec(&sh->context); if(result){ mp_msg(MSGT_DECAUDIO,MSGL_WARN,"Decoder open failed, error code: 0x%X\n",result); |