]> git.sesse.net Git - mlt/commitdiff
fix loading LADSPA plugins with broken constructor
authorDan Dennedy <dan@dennedy.org>
Thu, 24 Nov 2011 04:32:00 +0000 (20:32 -0800)
committerDan Dennedy <dan@dennedy.org>
Thu, 24 Nov 2011 04:32:00 +0000 (20:32 -0800)
src/modules/jackrack/plugin_mgr.c

index fd8d5d6228c3b8ffbbabad0ee820b5c4913c3b9b..7d96dfcf53bd83716815762237aa726e52bf1c49 100644 (file)
@@ -103,6 +103,13 @@ plugin_mgr_get_object_file_plugins (plugin_mgr_t * plugin_mgr, const char * file
     return;
   }
   
+#ifdef __DARWIN__
+  if (!get_descriptor (0)) {
+    void (*constructor)(void) = dlsym (dl_handle, "_init");
+    constructor();
+  }
+#endif
+
   plugin_index = 0;
   while ( (descriptor = get_descriptor (plugin_index)) )
     {