From 20affbb8d250146824e48298f5f140f51f50f205 Mon Sep 17 00:00:00 2001 From: gnattu Date: Thu, 26 Sep 2024 17:48:26 +0800 Subject: [PATCH] avfilter/transpose_vt: fix build on xcode 16 Xcode 16 marks VTPixelRotationSessionRef as macOS 13+ only type as well. As it is technically only a pointer, use type void* in the struct and cast to VTPixelRotationSessionRef when using. --- ...51-add-coreimage-based-vf-transpose-vt-filter.patch | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/debian/patches/0051-add-coreimage-based-vf-transpose-vt-filter.patch b/debian/patches/0051-add-coreimage-based-vf-transpose-vt-filter.patch index 6fdb4b92..feecae90 100644 --- a/debian/patches/0051-add-coreimage-based-vf-transpose-vt-filter.patch +++ b/debian/patches/0051-add-coreimage-based-vf-transpose-vt-filter.patch @@ -305,7 +305,7 @@ Index: FFmpeg/libavfilter/vf_transpose_vt.m =================================================================== --- /dev/null +++ FFmpeg/libavfilter/vf_transpose_vt.m -@@ -0,0 +1,383 @@ +@@ -0,0 +1,379 @@ +/* + * Copyright (c) 2023 Zhao Zhili + * Copyright (c) 2024 Gnattu OC @@ -345,15 +345,11 @@ Index: FFmpeg/libavfilter/vf_transpose_vt.m + #define LEGACY_VT_SDK +#endif + -+#ifdef LEGACY_VT_SDK -+typedef void* VTPixelRotationSessionRef; -+#endif -+ +typedef struct TransposeVtContext { + AVClass *class; + CIContext *ci_ctx; + CGImagePropertyOrientation orientation; -+ VTPixelRotationSessionRef session; ++ void* session; + + int dir; + int passthrough; @@ -366,7 +362,7 @@ Index: FFmpeg/libavfilter/vf_transpose_vt.m + if (@available(macOS 13.0, iOS 16, *)) { + int ret; + -+ ret = VTPixelRotationSessionCreate(kCFAllocatorDefault, &s->session); ++ ret = VTPixelRotationSessionCreate(kCFAllocatorDefault, (VTPixelRotationSessionRef *) &s->session); + if (ret != noErr) { + av_log(avctx, AV_LOG_ERROR, "Rotation session create failed, %d\n", ret); + return AVERROR_EXTERNAL;