Skip to content

Commit

Permalink
Merge pull request #328424 from toonn/ffmpeg_7-avfoundation-compat
Browse files Browse the repository at this point in the history
ffmpeg: Patch for compatibility with 10.12 AVFoundation
  • Loading branch information
Atemu committed Jul 22, 2024
2 parents 8e8c87b + 1b2e3bd commit 3f8971c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From a804dd05351716b1fd9a7c2b7ed636613edd9c0f Mon Sep 17 00:00:00 2001
From: toonn <[email protected]>
Date: Fri, 21 Jun 2024 18:59:49 +0000
Subject: [PATCH] avfoundation.m: macOS SDK 10.12 compatibility

---
libavdevice/avfoundation.m | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m
index d9b17ccdae..2a1f66d751 100644
--- a/libavdevice/avfoundation.m
+++ b/libavdevice/avfoundation.m
@@ -762,7 +762,7 @@ static int get_audio_config(AVFormatContext *s)
return 0;
}

-static NSArray* getDevicesWithMediaType(AVMediaType mediaType) {
+static NSArray* getDevicesWithMediaType(NSString * mediaType) {
#if ((TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000) || (TARGET_OS_OSX && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500))
NSMutableArray *deviceTypes = nil;
if (mediaType == AVMediaTypeVideo) {
--
2.44.0

3 changes: 3 additions & 0 deletions pkgs/development/libraries/ffmpeg/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,9 @@ stdenv.mkDerivation (finalAttrs: {
url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/7b7b7819bd21cc92ac07f6696b0e7f26fa8f9834";
hash = "sha256-TKI289XqtG86Sj9s7mVYvmkjAuRXeK+2cYYEDkg6u6I=";
})
]
++ optionals (lib.versionAtLeast version "7.0") [
./0001-avfoundation.m-macOS-SDK-10.12-compatibility.patch
];

configurePlatforms = [];
Expand Down

0 comments on commit 3f8971c

Please sign in to comment.