Skip to content

Commit

Permalink
Add additional build flags for ffmpeg on "arm64-v8a"
Browse files Browse the repository at this point in the history
From NDK 23.1.7779620 and above, the arm64-v8a ABI needs additional
build flags to correctly link the ffmpeg libraries.

Issue: #9933
PiperOrigin-RevId: 467161973
  • Loading branch information
tonihei authored and marcbaechinger committed Oct 19, 2022
1 parent 91fc5c4 commit 6ea1d0e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions extensions/ffmpeg/src/main/jni/CMakeLists.txt
Expand Up @@ -21,6 +21,12 @@ set(CMAKE_CXX_STANDARD 11)

project(libffmpegJNI C CXX)

# Additional flags needed for "arm64-v8a" from NDK 23.1.7779620 and above.
# See https://github.com/google/ExoPlayer/issues/9933#issuecomment-1029775358.
if(${ANDROID_ABI} MATCHES "arm64-v8a")
set(CMAKE_CXX_FLAGS "-Wl,-Bsymbolic")
endif()

set(ffmpeg_location "${CMAKE_CURRENT_SOURCE_DIR}/ffmpeg")
set(ffmpeg_binaries "${ffmpeg_location}/android-libs/${ANDROID_ABI}")

Expand Down

0 comments on commit 6ea1d0e

Please sign in to comment.