]> git.sesse.net Git - ffmpeg/commitdiff
lavc/audiotoolboxenc: allow setting maxrate with pre-10.9 deployment targets
authorRodger Combs <rodger.combs@gmail.com>
Sun, 27 Mar 2016 17:17:25 +0000 (12:17 -0500)
committerRodger Combs <rodger.combs@gmail.com>
Sat, 2 Apr 2016 08:03:13 +0000 (03:03 -0500)
The build failure here is caused by the enum value not being defined, but
as long as we're on a newer SDK that has it, it's safe to use it even
when our deployment target is older. Setting the property will error, but
we're not failing on errors there.

libavcodec/audiotoolboxenc.c

index 2fca15be21a9c3f013624c1254695262bb7df849..855df0cf0471024ab0332e7be93321c05841e87d 100644 (file)
@@ -428,7 +428,7 @@ static av_cold int ffat_init_encoder(AVCodecContext *avctx)
 
     ffat_update_ctx(avctx);
 
-#if !TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+#if !TARGET_OS_IPHONE && defined(__MAC_10_9)
     if (at->mode == kAudioCodecBitRateControlMode_Variable && avctx->rc_max_rate) {
         UInt32 max_size = avctx->rc_max_rate * avctx->frame_size / avctx->sample_rate;
         if (max_size)