Skip to content

Commit

Permalink
obs-filter: Fix potential symbol clashing on Linux
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fzwoch authored and jp9000 committed Oct 16, 2020
1 parent 7331a43 commit bac24c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/obs-filters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bac24c2

Please sign in to comment.