Skip to content

Commit

Permalink
update how hscale ios patch is applied for issue tanersener#370
Browse files Browse the repository at this point in the history
  • Loading branch information
tanersener committed Apr 6, 2020
1 parent 080bb47 commit 10a4642
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
3 changes: 0 additions & 3 deletions build/android-ffmpeg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,6 @@ export LDFLAGS="${LDFLAGS}"
# USE HIGHER LIMITS FOR FFMPEG LINKING
ulimit -n 2048 1>>${BASEDIR}/build.log 2>&1

# undo workaround for issue #328
git checkout ${BASEDIR}/src/${LIB_NAME}/libswscale/aarch64/hscale.S 1>>${BASEDIR}/build.log 2>&1

./configure \
--cross-prefix="${BUILD_HOST}-" \
--sysroot="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/sysroot" \
Expand Down
11 changes: 7 additions & 4 deletions build/ios-ffmpeg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -405,12 +405,9 @@ if [[ -z ${NO_WORKSPACE_CLEANUP_ffmpeg} ]]; then
make distclean 2>/dev/null 1>/dev/null
fi

# Workaround to prevent adding of -mdynamic-no-pic flag
${SED_INLINE} 's/check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic;/check_cflags -mdynamic-no-pic;/g' ./configure 1>>${BASEDIR}/build.log 2>&1

# Workaround for issue #328
rm -f ${BASEDIR}/src/${LIB_NAME}/libswscale/aarch64/hscale.S 1>>${BASEDIR}/build.log 2>&1
cp ${BASEDIR}/tools/make/ffmpeg/libswscale/aarch64/hscale.S ${BASEDIR}/src/${LIB_NAME}/libswscale/aarch64/hscale.S 1>>${BASEDIR}/build.log 2>&1

# Workaround for videotoolbox on mac catalyst
if [ ${ARCH} == "x86-64-mac-catalyst" ]; then
${SED_INLINE} 's/ CFDictionarySetValue(buffer_attributes\, kCVPixelBufferOpenGLESCompatibilityKey/ \/\/ CFDictionarySetValue(buffer_attributes\, kCVPixelBufferOpenGLESCompatibilityKey/g' ${BASEDIR}/src/${LIB_NAME}/libavcodec/videotoolbox.c
Expand Down Expand Up @@ -474,6 +471,12 @@ fi
--disable-vdpau \
${CONFIGURE_POSTFIX} 1>>${BASEDIR}/build.log 2>&1

# Workaround for issue #328
echo "" >>ffbuild/config.mak
echo "all:" >>ffbuild/config.mak
echo "libswscale/aarch64/hscale.o: ${BASEDIR}/tools/make/ffmpeg/libswscale/aarch64/hscale.S" >>ffbuild/config.mak
echo ' $(COMPILE_S)' >>ffbuild/config.mak

if [ $? -ne 0 ]; then
echo "failed"
exit 1
Expand Down

0 comments on commit 10a4642

Please sign in to comment.