[vlc-devel] [PATCH 2/2] plugin cache: Windows doesn't like relative pathes in LoadLibraryEx()

Steve Lhomme robux4 at videolabs.io
Fri Sep 30 09:49:19 CEST 2016


Fixes "vlc-cache-gen ../modules" on Windows and general VLC_PLUGIN_PATH usage.
---
 src/modules/bank.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/modules/bank.c b/src/modules/bank.c
index 19292e6..3e71c95 100644
--- a/src/modules/bank.c
+++ b/src/modules/bank.c
@@ -336,7 +336,11 @@ static void AllocateAllPlugins (vlc_object_t *p_this)
     if( paths == NULL )
         return;
 
+#ifdef _WIN32
+    paths = realpath( paths, NULL );
+#else
     paths = strdup( paths ); /* don't harm the environment ! :) */
+#endif
     if( unlikely(paths == NULL) )
         return;
 
-- 
2.8.2



More information about the vlc-devel mailing list