Skip to content

Commit

Permalink
[media] FFMPEG 7 build fix on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Apr 11, 2024
1 parent d247616 commit 37c9524
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/mac-builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,42 @@ jobs:
run: |
./ci/developer.build.sh -S "$PWD" -B build-developer
m1-test:
name: macOS (Test CMake)
runs-on: macos-14
steps:
- run: |
echo 'int main() { }' > main.cpp
printf 'cmake_minimum_required(VERSION 3.25)\nproject(foo)\nmessage("CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}")\nmessage("CMAKE_HOST_SYSTEM_PROCESSOR: ${CMAKE_HOST_SYSTEM_PROCESSOR}")\nadd_executable(foo main.cpp)' > CMakeLists.txt
echo " ======== 1 ======== "
cmake -S . -B build1
export PATH=/usr/local/bin:/opt/homebrew/bin:$PATH
if [[ -d /Applications/Xcode_15.4.app ]]; then
export XCODE_ROOT=/Applications/Xcode_15.4.app
sudo xcode-select -s "$XCODE_ROOT"
elif [[ -d /Applications/Xcode_15.3.app ]]; then
export XCODE_ROOT=/Applications/Xcode_15.3.app
sudo xcode-select -s "$XCODE_ROOT"
elif [[ -d /Applications/Xcode_15.2.app ]]; then
export XCODE_ROOT=/Applications/Xcode_15.2.app
sudo xcode-select -s "$XCODE_ROOT"
elif [[ -d /Applications/Xcode_15.1.app ]]; then
export XCODE_ROOT=/Applications/Xcode_15.1.app
sudo xcode-select -s "$XCODE_ROOT"
elif [[ -d /Applications/Xcode_15.0.app ]]; then
export XCODE_ROOT=/Applications/Xcode_15.0.app
sudo xcode-select -s "$XCODE_ROOT"
else
export XCODE_ROOT=/Applications/Xcode.app
fi
echo " ======== 2 ======== "
cmake -S . -B build2
m1-package:
name: macOS (AppleSilicon Release)
runs-on: macos-14
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/score-plugin-media/Video/VideoDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -818,8 +818,10 @@ void VideoDecoder::close_video() noexcept
{
avcodec_flush_buffers(m_codecContext);
#if defined(__APPLE__)
#if FF_API_VT_HWACCEL_CONTEXT
if(m_codecContext->hwaccel_context)
av_videotoolbox_default_free(m_codecContext);
#endif
#endif
avcodec_free_context(&m_codecContext);

Expand Down

0 comments on commit 37c9524

Please sign in to comment.