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