From 3d6e418a58895503586bd8c521ad9e120bbb1b32 Mon Sep 17 00:00:00 2001 From: Yongjoo Ahn Date: Mon, 18 Apr 2022 16:11:27 +0900 Subject: [PATCH] [subplugin] g_module_open with LOCAL flag (instead of GLOBAL) - When tf1-lite and tf2-lite both are present, the later called subplugin is not initalized. It's because the constructor functions are same as "init_filter_tflite". e.g.) `g_module_open (...tf1lite.so, 0)` will call "init_filter_tflite" of tf2lite.so. - This resolves #3709 Signed-off-by: Yongjoo Ahn --- gst/nnstreamer/nnstreamer_subplugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/nnstreamer/nnstreamer_subplugin.c b/gst/nnstreamer/nnstreamer_subplugin.c index cea4cc8..dcdf885 100644 --- a/gst/nnstreamer/nnstreamer_subplugin.c +++ b/gst/nnstreamer/nnstreamer_subplugin.c @@ -112,7 +112,7 @@ _search_subplugin (subpluginType type, const gchar * name, const gchar * path) g_return_val_if_fail (name != NULL, NULL); g_return_val_if_fail (path != NULL, NULL); - module = g_module_open (path, 0); + module = g_module_open (path, G_MODULE_BIND_LOCAL); /* If this is a correct subplugin, it will register itself */ if (module == NULL) { ml_loge ("Cannot open %s(%s) with error %s.", name, path, -- 2.7.4