Commit 2fa39dbd authored by moto's avatar moto Committed by Facebook GitHub Bot
Browse files

Fix mac ffmpeg build (#3459)

Summary:
Follow up of  https://github.com/pytorch/audio/pull/3455

FFMPEG_VERSION env ver is not defined in existing CI jobs.

Pull Request resolved: https://github.com/pytorch/audio/pull/3459

Reviewed By: atalman

Differential Revision: D47249074

Pulled By: mthrok

fbshipit-source-id: 20f82d749adef5f45a984ab8125592ef36279e94
parent ca66a1d3
...@@ -20,8 +20,9 @@ args="" ...@@ -20,8 +20,9 @@ args=""
if [[ "$OSTYPE" == "msys" ]]; then if [[ "$OSTYPE" == "msys" ]]; then
args="--toolchain=msvc" args="--toolchain=msvc"
fi fi
ffmpeg_version="${FFMPEG_VERSION:-4.1.8}"
archive="https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n${FFMPEG_VERSION:-4.1.8}.tar.gz" archive="https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n${ffmpeg_version}.tar.gz"
build_dir=$(mktemp -d -t ffmpeg-build.XXXXXXXXXX) build_dir=$(mktemp -d -t ffmpeg-build.XXXXXXXXXX)
cleanup() { cleanup() {
...@@ -74,7 +75,7 @@ ls ${prefix}/* ...@@ -74,7 +75,7 @@ ls ${prefix}/*
# macOS: Fix rpath so that the libraries are searched dynamically in user environment. # macOS: Fix rpath so that the libraries are searched dynamically in user environment.
# In Linux, this is handled by `--enable-rpath` flag. # In Linux, this is handled by `--enable-rpath` flag.
if [[ "$(uname)" == Darwin ]]; then if [[ "$(uname)" == Darwin ]]; then
major_ver=${FFMPEG_VERSION:0:1} major_ver=${ffmpeg_version:0:1}
if [[ ${major_ver} == 4 ]]; then if [[ ${major_ver} == 4 ]]; then
avutil=libavutil.56 avutil=libavutil.56
avcodec=libavcodec.58 avcodec=libavcodec.58
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment