diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-03-23 18:01:00 +0000 |
---|---|---|
committer | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-03-23 18:01:00 +0000 |
commit | 5e480c7b817748e000caa967711f28eae5e2a3f2 (patch) | |
tree | 83a6663e3ced7c09afde135341c6760fe761465b /loader | |
parent | cb26eaf0bbcf028e3cf23c912e061268dcbb8127 (diff) | |
download | mpv-5e480c7b817748e000caa967711f28eae5e2a3f2.tar.bz2 mpv-5e480c7b817748e000caa967711f28eae5e2a3f2.tar.xz |
Get rid of pointless def_path variable; use codec_path directly instead.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30949 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader')
-rw-r--r-- | loader/elfdll.c | 2 | ||||
-rw-r--r-- | loader/module.c | 4 | ||||
-rw-r--r-- | loader/win32.c | 23 |
3 files changed, 16 insertions, 13 deletions
diff --git a/loader/elfdll.c b/loader/elfdll.c index 5c33d2bde9..f6ac158107 100644 --- a/loader/elfdll.c +++ b/loader/elfdll.c @@ -68,7 +68,7 @@ void *ELFDLL_dlopen(const char *libname, int flags) /* Now try to construct searches through our extra search-path */ namelen = strlen(libname); - ldpath = def_path; + ldpath = codec_path; while(ldpath && *ldpath) { int len; diff --git a/loader/module.c b/loader/module.c index b6eebcf19d..d0f32d2537 100644 --- a/loader/module.c +++ b/loader/module.c @@ -393,9 +393,9 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags) strncpy(path, libname, 511); else /* check default user path */ - strncpy(path, def_path, 300); + strncpy(path, codec_path, 300); } - else if (strcmp(def_path, listpath[i])) + else if (strcmp(codec_path, listpath[i])) /* path from the list */ strncpy(path, listpath[i], 300); else diff --git a/loader/win32.c b/loader/win32.c index fe8b198944..99f8ffd991 100644 --- a/loader/win32.c +++ b/loader/win32.c @@ -2575,7 +2575,8 @@ static int WINAPI expLoadLibraryA(char* name) return MODULE_HANDLE_psapi; result=LoadLibraryA(name); - dbgprintf("Returned LoadLibraryA(0x%x='%s'), def_path=%s => 0x%x\n", name, name, def_path, result); + dbgprintf("Returned LoadLibraryA(0x%x='%s'), codec_path=%s => 0x%x\n", + name, name, codec_path, result); return result; } @@ -3589,13 +3590,15 @@ static HANDLE WINAPI expFindFirstFileA(LPCSTR s, LPWIN32_FIND_DATAA lpfd) #ifdef CONFIG_QTX_CODECS if(strstr(s, "quicktime\\*.QTX")){ dbgprintf("FindFirstFileA(0x%x='%s', 0x%x) => QTX\n", s, s, lpfd); - dbgprintf("\n### Searching for QuickTime plugins (*.qtx) at %s...\n",def_path); - qtx_dir=opendir(def_path); + dbgprintf("\n### Searching for QuickTime plugins (*.qtx) at %s...\n", + codec_path); + qtx_dir = opendir(codec_path); if(!qtx_dir) return (HANDLE)-1; memset(lpfd,0,sizeof(*lpfd)); if(expFindNextFileA(FILE_HANDLE_quicktimeqtx,lpfd)) return FILE_HANDLE_quicktimeqtx; - printf("loader: Couldn't find the QuickTime plugins (.qtx files) at %s\n",def_path); + printf("loader: Couldn't find the QuickTime plugins (.qtx files) at %s\n", + codec_path); return (HANDLE)-1; } #if 0 @@ -3732,8 +3735,8 @@ static HANDLE WINAPI expCreateFileA(LPCSTR cs1,DWORD i1,DWORD i2, if(strstr(cs1, "QuickTime.qts")) { int result; - char* tmp=malloc(strlen(def_path)+50); - strcpy(tmp, def_path); + char* tmp = malloc(strlen(codec_path) + 50); + strcpy(tmp, codec_path); strcat(tmp, "/"); strcat(tmp, "QuickTime.qts"); result=open(tmp, O_RDONLY); @@ -3743,9 +3746,9 @@ static HANDLE WINAPI expCreateFileA(LPCSTR cs1,DWORD i1,DWORD i2, if(strstr(cs1, ".qtx")) { int result; - char* tmp=malloc(strlen(def_path)+250); + char* tmp = malloc(strlen(codec_path) + 250); char* x=strrchr(cs1,'\\'); - sprintf(tmp,"%s/%s",def_path,x?(x+1):cs1); + sprintf(tmp, "%s/%s", codec_path, x ? (x + 1) : cs1); // printf("### Open: %s -> %s\n",cs1,tmp); result=open(tmp, O_RDONLY); free(tmp); @@ -3756,8 +3759,8 @@ static HANDLE WINAPI expCreateFileA(LPCSTR cs1,DWORD i1,DWORD i2, if(strncmp(cs1, "AP", 2) == 0) { int result; - char* tmp=malloc(strlen(def_path)+50); - strcpy(tmp, def_path); + char* tmp = malloc(strlen(codec_path) + 50); + strcpy(tmp, codec_path); strcat(tmp, "/"); strcat(tmp, "APmpg4v1.apl"); result=open(tmp, O_RDONLY); |