From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 50385483CB for ; Mon, 1 Jan 2024 21:47:54 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3915968CE20; Mon, 1 Jan 2024 23:47:51 +0200 (EET) Received: from mail8.parnet.fi (mail8.parnet.fi [77.234.108.134]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E02D668CB0C for ; Mon, 1 Jan 2024 23:47:43 +0200 (EET) Received: from mail9.parnet.fi (mail9.parnet.fi [77.234.108.21]) by mail8.parnet.fi with ESMTP id 401Llfb8019226-401Llfb9019226 for ; Mon, 1 Jan 2024 23:47:41 +0200 Received: from foo.martin.st (host-97-144.parnet.fi [77.234.97.144]) by mail9.parnet.fi (Postfix) with ESMTPS id 72DB1A146B for ; Mon, 1 Jan 2024 23:47:41 +0200 (EET) Date: Mon, 1 Jan 2024 23:47:40 +0200 (EET) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: FFmpeg development discussions and patches In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-FE-Policy-ID: 3:14:2:SYSTEM Subject: Re: [FFmpeg-devel] [PATCH] libavdevice/avfoundation.m Add missing type AVMediaType for macOS < 10.13. X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Mon, 1 Jan 2024, David Bohman wrote: > This is a build failure in the master branch as a result of commit > e37b15e26fbc7bc31a86a4a2c7c798e20d4f4c2c: > > There is no type AVMediaType prior to macOS 10.13. > --- > libavdevice/avfoundation.m | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m > index 6a57163eb7..5fc5cb61c5 100644 > --- a/libavdevice/avfoundation.m > +++ b/libavdevice/avfoundation.m > @@ -761,6 +761,10 @@ static int get_audio_config(AVFormatContext *s) > return 0; > } > > +#if TARGET_OS_OSX && __MAC_OS_X_VERSION_MIN_REQUIRED < 101300 > +typedef NSString *AVMediaType; > +#endif > + Checking the min required version of the SDK is the wrong check here. If you use a recent macOS SDK but target an older version of macOS, this typedef is still available; check the AVMediaFormat.h header - there's no ifdef around the AVMediaType typedef. Therefore, the availability of this type is connected to the SDK version, not the runtime target version. Therefore, use MAC_OS_X_VERSION_MAX_ALLOWED or something similar to check the actual SDK version, not the target version (as set by e.g. -mmacosx-version-min). // Martin _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".