From fe2bc7ba717b55752e7f7225d6dc30ebf7761d24 Mon Sep 17 00:00:00 2001 From: aquilescanta Date: Wed, 16 Sep 2020 16:33:09 +0100 Subject: [PATCH] Fix the FFmpeg extension build Since gradle 4.0, CMake imported libraries are bundled in the APK, so manually bundling them causes a duplication which breaks the build. Issue: #7906 PiperOrigin-RevId: 332012375 --- extensions/ffmpeg/build.gradle | 7 ------- extensions/ffmpeg/src/main/jni/CMakeLists.txt | 2 -- 2 files changed, 9 deletions(-) diff --git a/extensions/ffmpeg/build.gradle b/extensions/ffmpeg/build.gradle index bf715b7760..a9edeaff6b 100644 --- a/extensions/ffmpeg/build.gradle +++ b/extensions/ffmpeg/build.gradle @@ -13,13 +13,6 @@ // limitations under the License. apply from: "$gradle.ext.exoplayerSettingsDir/common_library_config.gradle" -android { - sourceSets.main { - // The directory from which to pick the ffmpeg binaries. - jniLibs.srcDir 'src/main/libs' - } -} - // Configure the native build only if ffmpeg is present to avoid gradle sync // failures if ffmpeg hasn't been built according to the README instructions. if (project.file('src/main/jni/ffmpeg').exists()) { diff --git a/extensions/ffmpeg/src/main/jni/CMakeLists.txt b/extensions/ffmpeg/src/main/jni/CMakeLists.txt index 4f16509721..b60af4fa18 100644 --- a/extensions/ffmpeg/src/main/jni/CMakeLists.txt +++ b/extensions/ffmpeg/src/main/jni/CMakeLists.txt @@ -7,7 +7,6 @@ project(libffmpeg_jni C CXX) set(ffmpeg_location "${CMAKE_CURRENT_SOURCE_DIR}/ffmpeg") set(ffmpeg_binaries "${ffmpeg_location}/android-libs/${ANDROID_ABI}") -set(ffmpeg_output_dir "${CMAKE_CURRENT_SOURCE_DIR}/../libs/${ANDROID_ABI}") foreach(ffmpeg_lib avutil swresample avcodec) set(ffmpeg_lib_filename lib${ffmpeg_lib}.so) @@ -20,7 +19,6 @@ foreach(ffmpeg_lib avutil swresample avcodec) ${ffmpeg_lib} PROPERTIES IMPORTED_LOCATION ${ffmpeg_lib_file_path}) - file(COPY ${ffmpeg_lib_file_path} DESTINATION ${ffmpeg_output_dir}) endforeach() include_directories(${ffmpeg_location})