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
This commit is contained in:
Florian Zwoch 2020-10-16 13:26:02 +02:00 committed by Jim
parent 7331a43aee
commit bac24c2ca6

View File

@ -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)