diff --git a/multimedia/ffmpeg7/Portfile b/multimedia/ffmpeg7/Portfile index 47442407b3da8..16e64b285a024 100644 --- a/multimedia/ffmpeg7/Portfile +++ b/multimedia/ffmpeg7/Portfile @@ -12,7 +12,7 @@ name ffmpeg7 set my_name ffmpeg version 7.0.1 -revision 0 +revision 1 license LGPL-2.1+ categories multimedia @@ -105,6 +105,9 @@ patchfiles-append patch-libavcodec-profvidworkflow.diff # TODO: Raise the issue to upstream patchfiles-append patch-libavcodec-librsvgdec.diff +# Typedef AVMediaType to NSString* on older systems +patchfiles-append patch-libavdevice-avfoundation.diff + # https://trac.macports.org/ticket/68720 # Remove once upstream has included these in the next release # patchfiles-append patch-issue-10695.diff diff --git a/multimedia/ffmpeg7/files/patch-libavdevice-avfoundation.diff b/multimedia/ffmpeg7/files/patch-libavdevice-avfoundation.diff new file mode 100644 index 0000000000000..de6226d85d52d --- /dev/null +++ b/multimedia/ffmpeg7/files/patch-libavdevice-avfoundation.diff @@ -0,0 +1,13 @@ +--- libavdevice/avfoundation.m ++++ libavdevice/avfoundation.m +@@ -763,6 +763,10 @@ static int get_audio_config(AVFormatContext *s) + return 0; + } + ++#if ((TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MAX_ALLOWED < 110000) || (TARGET_OS_OSX && __MAC_OS_X_VERSION_MAX_ALLOWED < 101300)) ++typedef NSString* AVMediaType; ++#endif ++ + static NSArray* getDevicesWithMediaType(AVMediaType mediaType) { + #if ((TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000) || (TARGET_OS_OSX && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500)) + NSMutableArray *deviceTypes = nil;