fix disabling ffmpeg-kit protocols in android build scripts, fixes #395

This commit is contained in:
Taner Sener 2022-04-15 11:27:20 +01:00
parent f8c5b16bdb
commit a09c72016f
2 changed files with 30 additions and 1 deletions

View File

@ -132,3 +132,32 @@ jobs:
- name: print ffbuild logs
if: ${{ failure() }}
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log'
build-main-without-ffmpeg-kit-protocols-on-linux:
name: build without ffmpeg-kit protocols
runs-on: ubuntu-20.04
strategy:
matrix:
ndk-version: [ 'r22b-linux-x86_64' ]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: set up adopt jdk 8
uses: actions/setup-java@v2.2.0
with:
distribution: 'adopt'
java-version: '8'
- name: set up android ndk
run: |
curl -s "https://dl.google.com/android/repository/android-ndk-${{ matrix.ndk-version }}.zip" -o ndk.zip
unzip -q -o ndk.zip -d .ndk
echo "ANDROID_NDK_ROOT=$PWD/.ndk/$(ls .ndk)" >> $GITHUB_ENV
- name: run the build script
run: ./android.sh --no-ffmpeg-kit-protocols --disable-x86 --disable-x86-64 --disable-arm-v7a --disable-arm-v7a-neon
- name: print build logs
if: ${{ always() }}
run: cat build.log
- name: print ffbuild logs
if: ${{ failure() }}
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log'

View File

@ -405,7 +405,7 @@ ${SED_INLINE} "s/\$version/$FFMPEG_VERSION/g" "${BASEDIR}"/src/"${LIB_NAME}"/ffb
# 3. Enable ffmpeg-kit protocols
if [[ ${NO_FFMPEG_KIT_PROTOCOLS} == "1" ]]; then
${SED_INLINE} "s/ av_set_fd_close/\/\/av_set_fd_close/g" "${BASEDIR}"/android/ffmpeg-kit-android-lib/src/main/cpp/ffmpegkit.c 1>>"${BASEDIR}"/build.log 2>&1
${SED_INLINE} "s| av_set_saf|//av_set_saf|g" "${BASEDIR}"/android/ffmpeg-kit-android-lib/src/main/cpp/ffmpegkit.c 1>>"${BASEDIR}"/build.log 2>&1
echo -e "\nINFO: Disabled custom ffmpeg-kit protocols\n" 1>>"${BASEDIR}"/build.log 2>&1
else
cat ../../tools/protocols/libavformat_file.c >> libavformat/file.c