Commit fa4f696a authored by Jan Schmidt's avatar Jan Schmidt

ladspa: Don't try and load every file as a plugin

When scanning paths for LADSPA plugins, don't try and load
every random file as a module, as g_module_open ends up throwing
errors on Windows.

Use a G_MODULE_SUFFIX and GST_EXTRA_MODULE_SUFFIX suffix check as
we do for GStreamer plugins.

https://bugzilla.gnome.org/show_bug.cgi?id=796450
parent e6368cc2
......@@ -302,7 +302,19 @@ ladspa_plugin_directory_search (GstPlugin * ladspa_plugin, const char *dir_name)
return FALSE;
while ((entry_name = g_dir_read_name (dir))) {
/* Only attempt to open files with the module suffixes */
if (!g_str_has_suffix (entry_name, "." G_MODULE_SUFFIX)
#ifdef GST_EXTRA_MODULE_SUFFIX
&& !g_str_has_suffix (entry_name, GST_EXTRA_MODULE_SUFFIX)
#endif
) {
GST_TRACE ("Ignoring file %s as it has the wrong suffix for a plugin",
entry_name);
continue;
}
file_name = g_build_filename (dir_name, entry_name, NULL);
GST_LOG ("Probing file %s as a LADSPA plugin", file_name);
plugin =
g_module_open (file_name, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
if (plugin) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment