From 67c21b18f4d31dc80b66f27680597bd4af3133f1 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Mon, 26 Apr 2010 15:06:09 +0300 Subject: [PATCH] ladspa,lv2: don't fail in plugin_init when having 0 elements If we fail, the plugin scanner will blacklist us. --- ext/ladspa/gstladspa.c | 7 ++++++- ext/lv2/gstlv2.c | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ext/ladspa/gstladspa.c b/ext/ladspa/gstladspa.c index 0c8f5e0..52a8d5b 100644 --- a/ext/ladspa/gstladspa.c +++ b/ext/ladspa/gstladspa.c @@ -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, diff --git a/ext/lv2/gstlv2.c b/ext/lv2/gstlv2.c index 8572aa2..dd0a1d6 100644 --- a/ext/lv2/gstlv2.c +++ b/ext/lv2/gstlv2.c @@ -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__ -- 2.7.4