Skip to content

Commit 1902179

Browse files
committed
add patch for ffmpeg5
1 parent 49b1462 commit 1902179

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 1ebd4c062a886049f3c3255c50fe56f6621b9844 Mon Sep 17 00:00:00 2001
2+
From: qianlongxu <qianlongxu@gmail.com>
3+
Date: Fri, 26 Jul 2024 16:11:14 +0800
4+
Subject: [PATCH 20] 'supportsFamily:' is only available on iOS 13.0 or newer
5+
6+
---
7+
libavfilter/metal/utils.m | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
diff --git a/libavfilter/metal/utils.m b/libavfilter/metal/utils.m
11+
index f365d3c..bb1825a 100644
12+
--- a/libavfilter/metal/utils.m
13+
+++ b/libavfilter/metal/utils.m
14+
@@ -31,7 +31,7 @@ void ff_metal_compute_encoder_dispatch(id<MTLDevice> device,
15+
BOOL fallback = YES;
16+
// MAC_OS_X_VERSION_10_15 is only defined on SDKs new enough to include its functionality (including iOS, tvOS, etc)
17+
#ifdef MAC_OS_X_VERSION_10_15
18+
- if (@available(macOS 10.15, iOS 11, tvOS 14.5, *)) {
19+
+ if (@available(macOS 10.15, iOS 13, tvOS 14.5, *)) {
20+
if ([device supportsFamily:MTLGPUFamilyCommon3]) {
21+
MTLSize threadsPerGrid = MTLSizeMake(width, height, 1);
22+
[encoder dispatchThreads:threadsPerGrid threadsPerThreadgroup:threadsPerThreadgroup];
23+
--
24+
2.39.3 (Apple Git-146)
25+

0 commit comments

Comments
 (0)