> On Sep 5, 2016, at 23:08, Dmitry Kalinkin <dmitry.kalin...@gmail.com> wrote: > > >> On 06 Sep 2016, at 00:05, Rodger Combs <rodger.co...@gmail.com> wrote: >> >> >>> On Sep 5, 2016, at 22:58, Dmitry Kalinkin <dmitry.kalin...@gmail.com> wrote: >>> >>> __MAC_10_11 can be present in updated revision of an older SDK so it >>> can't reliably detect availability of kAudioFormatEnhancedAC3 constant. >>> >>> Fixes: b4daa2c40f ('lavc/audiotoolboxdec: add eac3 decoder') >>> Cc: Rodger Combs <rodger.co...@gmail.com> >>> Signed-off-by: Dmitry Kalinkin <dmitry.kalin...@gmail.com> >>> --- >>> libavcodec/audiotoolboxdec.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/libavcodec/audiotoolboxdec.c b/libavcodec/audiotoolboxdec.c >>> index 1097668..bba6913 100644 >>> --- a/libavcodec/audiotoolboxdec.c >>> +++ b/libavcodec/audiotoolboxdec.c >>> @@ -32,7 +32,7 @@ >>> #include "libavutil/opt.h" >>> #include "libavutil/log.h" >>> >>> -#ifndef __MAC_10_11 >>> +#ifndef __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100 >>> #define kAudioFormatEnhancedAC3 'ec-3' >>> #endif >>> >>> -- >>> 2.7.4 (Apple Git-66) >>> >> >> We shouldn't use the MIN_REQUIRED macro here, since the runtime availability >> isn't affected by the minimum version we're building against. >> There might be a better macro available for this, but since the original >> definition is in an enum, our best bet might just be to make this #define >> unconditional. > > My understanding was that MIN_REQUIRED is defined by -mmacosx-version-min and > SDK is chosen accordingly. Also if it’s a macro it can’t depend on runtime. >
Oh, sorry, I was thinking of a different version of this check that I'd replaced. Yeah, I guess all this might do is redefine it if you're on a new SDK with an older mmacosx-version-min (which is fine since it's not a macro to begin with), so this LGTM. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel