Fix build of FFmpeg for armhf on aarch64 runners

This commit is contained in:
Cameron Gutman
2025-11-01 13:46:12 -05:00
parent 5bf3bfd7f2
commit dc45b12b7e

View File

@@ -48,9 +48,18 @@ if [ "$USE_PLATFORM_FFMPEG" == "0" ]; then
ninja -C build
ninja install -C build
# FFmpeg's architecture detection uses 'uname -m' which will be incorrect when
# natively executing a different hardware-compatible ABI (like armhf on aarch64
# or i686 on x86_64). We have to override that detection ourselves here.
FFMPEG_ARCH=$(dpkg --print-architecture)
if [ "$FFMPEG_ARCH" == "armhf" ]; then
# Most dpkg architectures are handled by FFmpeg, but armhf is a special case
FFMPEG_ARCH=arm
fi
# Build and install FFmpeg
cd /opt/FFmpeg
./configure $BASE_FFMPEG_ARGS $EXTRA_FFMPEG_ARGS $DAV1D_FFMPEG_ARGS
./configure --arch=$FFMPEG_ARCH $BASE_FFMPEG_ARGS $EXTRA_FFMPEG_ARGS $DAV1D_FFMPEG_ARGS
make -j$(nproc)
make install
fi