From 1294183928fac5c0afd6f98a80e714919a646e6a Mon Sep 17 00:00:00 2001 From: Taner Sener Date: Thu, 18 Feb 2021 01:12:57 +0000 Subject: [PATCH] fix videotoolbox flag check in ffmpeg-kit build script --- apple/src/FFmpegKitConfig.m | 9 +++++++++ scripts/apple/ffmpeg-kit.sh | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/apple/src/FFmpegKitConfig.m b/apple/src/FFmpegKitConfig.m index 60bbfb8..c361023 100644 --- a/apple/src/FFmpegKitConfig.m +++ b/apple/src/FFmpegKitConfig.m @@ -295,6 +295,15 @@ void removeSession(long sessionId) { atomic_store(&sessionMap[sessionId % SESSION_MAP_SIZE], 0); } +/** + * Adds a cancel session request to the session map. + * + * @param sessionId session id + */ +void cancelSession(long sessionId) { + atomic_store(&sessionMap[sessionId % SESSION_MAP_SIZE], 2); +} + /** * Checks whether a cancel request for the given session id exists in the session map. * diff --git a/scripts/apple/ffmpeg-kit.sh b/scripts/apple/ffmpeg-kit.sh index ed92115..cc795d7 100755 --- a/scripts/apple/ffmpeg-kit.sh +++ b/scripts/apple/ffmpeg-kit.sh @@ -43,7 +43,7 @@ fi # CHECK IF VIDEOTOOLBOX IS ENABLED VIDEOTOOLBOX_SUPPORT_FLAG="" -if [[ ${LIBRARY_APPLE_VIDEOTOOLBOX} -eq 1 ]]; then +if [[ ${ENABLED_LIBRARIES[$LIBRARY_APPLE_VIDEOTOOLBOX]} -eq 1 ]]; then VIDEOTOOLBOX_SUPPORT_FLAG="--enable-videotoolbox" fi