From bac24c2ca66f6021ce15a76d28b83856ea2af574 Mon Sep 17 00:00:00 2001 From: Florian Zwoch Date: Fri, 16 Oct 2020 13:26:02 +0200 Subject: [PATCH] obs-filter: Fix potential symbol clashing on Linux RNNoise symbols may collide with external ones provided by libcodec2.so which FFMPEG may pull in automatically. Changing the visibility of these symbols will guarantee the use of the internal ones and not pick some (potential incompatible) from outside. fixes #3561 --- plugins/obs-filters/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/obs-filters/CMakeLists.txt b/plugins/obs-filters/CMakeLists.txt index 0b827209e..9aa6fe90c 100644 --- a/plugins/obs-filters/CMakeLists.txt +++ b/plugins/obs-filters/CMakeLists.txt @@ -20,6 +20,9 @@ if(NOT LIBRNNOISE_FOUND) "rnnoise/src/*.h" "rnnoise/include/*.h") add_definitions(-DCOMPILE_OPUS) + if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") + set_property(SOURCE ${rnnoise_SOURCES} PROPERTY COMPILE_FLAGS "-fvisibility=protected") + endif() include_directories("rnnoise/include") source_group("rnnoise" FILES ${rnnoise_SOURCES}) set(LIBRNNOISE_FOUND TRUE)