diff -ur a/src/file/dl_posix.c b/src/file/dl_posix.c
--- a/src/file/dl_posix.c	2011-03-31 06:36:49.000000000 -0600
+++ b/src/file/dl_posix.c	2012-08-10 14:46:01.000000000 -0600
@@ -54,51 +54,71 @@
 }
 #endif
 
-void   *dl_dlopen  ( const char* path, const char *version )
+static void   *_dl_dlopen  ( const char* path )
 {
-    char *name;
     void *result;
 
-#if defined(__APPLE__)
-    static const char ext[] = ".dylib";
-    version = NULL;
-#elif defined(_WIN32)
-    static const char ext[] = ".dll";
-    version = NULL;
-#else
-    static const char ext[] = ".so";
-#endif
-
-    if (version) {
-        name = str_printf("%s%s.%s", path, ext, version);
-    } else {
-        name = str_printf("%s%s", path, ext);
-    }
-
-    BD_DEBUG(DBG_FILE, "searching for library '%s' ...\n", name);
+    BD_DEBUG(DBG_FILE, "searching for library '%s' ...\n", path);
 
 #if defined(_WIN32)
     wchar_t wname[MAX_PATH];
-    MultiByteToWideChar(CP_UTF8, 0, name, -1, wname, MAX_PATH);
+    MultiByteToWideChar(CP_UTF8, 0, path, -1, wname, MAX_PATH);
     result = LoadLibraryW(wname);
 
     if (!result) {
         char buf[128];
-        BD_DEBUG(DBG_FILE, "can't open library '%s': %s\n", name, dlerror(buf, sizeof(buf)));
+        BD_DEBUG(DBG_FILE, "can't open library '%s': %s\n", path, dlerror(buf, sizeof(buf)));
     }
 #else
-    result = dlopen(name, RTLD_LAZY);
+    result = dlopen(path, RTLD_LAZY);
 
     if (!result) {
-        BD_DEBUG(DBG_FILE, "can't open library '%s': %s\n", name, dlerror());
+        BD_DEBUG(DBG_FILE, "can't open library '%s': %s\n", path, dlerror());
     }
 #endif
 
-    X_FREE(name);
-
     return result;
 }
 
+void   *dl_dlopen  ( const char* path, const char *version )
+{
+    char *name;
+    void *dll;
+    int i;
+
+#if defined(__APPLE__)
+    static const char ext[] = ".dylib";
+    /* @loader_path = location of Mach-O binary that called dlopen (libbluray.dylib or liblibbluray_plugin.dylib)
+       @executable_path = location of currently running binary (most likely VLC) */
+    static const char *search_paths[] = {"", "@loader_path/lib/", "@loader_path/../lib/",
+					 "@executable_path/lib/", "@executable_path/../lib/", NULL};
+    version = NULL;
+#elif defined(_WIN32)
+    static const char ext[] = ".dll";
+    static const char *search_paths[] = {"", NULL};
+    version = NULL;
+#else
+    static const char ext[] = ".so";
+    static const char *search_paths[] = {"", NULL};
+#endif
+
+    for (i = 0 ; search_paths[i] ; ++i) {
+    if (version) {
+        name = str_printf("%s%s%s.%s", search_paths[i], path, ext, version);
+	 } else {
+	     name = str_printf("%s%s%s", search_paths[i], path, ext);
+	     }
+
+	dll = _dl_dlopen (path);
+	X_FREE(name);
+	if (dll) {
+	    return dll;
+	    }
+    }
+
+    return NULL;
+}
+
 void   *dl_dlsym   ( void* handle, const char* symbol )
 {
 #if defined(_WIN32)
