diff --git a/pj_plugins/src/detail/library_loader.hpp b/pj_plugins/src/detail/library_loader.hpp index 0c528e3d..f8a972f1 100644 --- a/pj_plugins/src/detail/library_loader.hpp +++ b/pj_plugins/src/detail/library_loader.hpp @@ -21,7 +21,7 @@ inline Expected loadLibraryHandle(std::string_view path) { } return reinterpret_cast(module); #else - void* handle = dlopen(std::string(path).c_str(), RTLD_NOW | RTLD_LOCAL); + void* handle = dlopen(std::string(path).c_str(), RTLD_NOW | RTLD_LOCAL | RTLD_DEEPBIND); if (handle == nullptr) { return unexpected(std::string(dlerror())); } diff --git a/pj_proto_app/src/main_window.cpp b/pj_proto_app/src/main_window.cpp index 1d2c5b99..d977fe1b 100644 --- a/pj_proto_app/src/main_window.cpp +++ b/pj_proto_app/src/main_window.cpp @@ -354,10 +354,9 @@ void MainWindow::onStartStream() { // Bind runtime host early so the dialog can call listAvailableEncodings() session->bindRuntimeHostForDialog(); - // Restore saved config so the dialog remembers previous choices - if (!saved_config.empty()) { - (void)session->handle().loadConfig(saved_config); - } + // Always call loadConfig() so the plugin can initialize (e.g., populate encodings list) + // even if there's no saved config yet + (void)session->handle().loadConfig(saved_config); // Dialog flow — use the session's own handle, not a temp handle std::string config = saved_config;