ladspa,lv2: don't fail in plugin_init when having 0 elements
authorStefan Kost <ensonic@users.sf.net>
Mon, 26 Apr 2010 12:06:09 +0000 (15:06 +0300)
committerStefan Kost <ensonic@users.sf.net>
Mon, 26 Apr 2010 12:07:16 +0000 (15:07 +0300)
If we fail, the plugin scanner will blacklist us.

ext/ladspa/gstladspa.c
ext/lv2/gstlv2.c

index 0c8f5e0..52a8d5b 100644 (file)
@@ -880,7 +880,12 @@ plugin_init (GstPlugin * plugin)
   ladspa_plugin = plugin;
   descriptor_quark = g_quark_from_static_string ("ladspa-descriptor");
 
-  return ladspa_plugin_path_search ();
+  if (!ladspa_plugin_path_search ()) {
+    GST_WARNING ("no ladspa plugins found, check LADSPA_PATH");
+  }
+
+  /* we don't want to fail, even if there are no elements registered */
+  return TRUE;
 }
 
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
index 8572aa2..dd0a1d6 100644 (file)
@@ -891,7 +891,12 @@ plugin_init (GstPlugin * plugin)
   if (!gst_audio_channel_position_get_type ())
     return FALSE;
 
-  return lv2_plugin_discover ();
+  if (!lv2_plugin_discover ()) {
+    GST_WARNING ("no lv2 plugins found, check LV2_PATH");
+  }
+
+  /* we don't want to fail, even if there are no elements registered */
+  return TRUE;
 }
 
 #ifdef __GNUC__