ref: f2aa3c75ae8a3d41ef85be739752d3f189c7eea3
parent: a8d125f52e47354a42568fc4c3cb2453010ea903
parent: aa78f205d678a6d92e33545a17608d270f524eda
author: Ethan Hugg <ethanhugg@gmail.com>
date: Sat Dec 14 03:42:09 EST 2013
Merge pull request #45 from mstorsjo/no-libdl Avoid all calls to libdl (or equivalent) if NO_DYNAMIC_VP is defined
--- a/codec/encoder/core/src/wels_preprocess.cpp
+++ b/codec/encoder/core/src/wels_preprocess.cpp
@@ -141,6 +141,7 @@
void* CWelsLib::QueryFunction (const str_t* pName) {
void* pFunc = NULL;
+#ifndef NO_DYNAMIC_VP
if (m_pVpLib) {
#if defined(WIN32)
HMODULE shModule = (HMODULE)m_pVpLib;
@@ -157,6 +158,7 @@
printf ("dlsym %s iRet=%p, err=%s\n", shModule, pFunc, dlerror());
#endif
}
+#endif
return pFunc;
}
--- a/codec/encoder/plus/src/welsCodecTrace.cpp
+++ b/codec/encoder/plus/src/welsCodecTrace.cpp
@@ -242,6 +242,7 @@
}
welsCodecTrace::~welsCodecTrace() {
+#ifndef NO_DYNAMIC_VP
#if defined WIN32
if (m_hTraceHandle) {
::FreeLibrary ((HMODULE)m_hTraceHandle);
@@ -254,6 +255,7 @@
if (m_hTraceHandle) {
::dlclose (m_hTraceHandle);
}
+#endif
#endif
m_hTraceHandle = NULL;