[FFmpeg-cvslog] avcodec/audiotoolboxenc: Fix compile error on OS X 10.8.
Dan Dennedy
git at videolan.org
Sat Mar 26 16:36:33 CET 2016
ffmpeg | branch: master | Dan Dennedy <ddennedy at gmail.com> | Fri Mar 25 04:13:18 2016 +0000| [28688d7c2b534cc36004ce27f2fafc6861e67f3f] | committer: Michael Niedermayer
avcodec/audiotoolboxenc: Fix compile error on OS X 10.8.
Fixes error "libavcodec/audiotoolboxenc.c:294:50: error: use of undeclared
identifier 'kAudioCodecPropertyPacketSizeLimitForVBR'."
That was added to 10.9:
https://developer.apple.com/library/mac/releasenotes/General/APIDiffsMacOSX10_9/AudioUnit.html
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=28688d7c2b534cc36004ce27f2fafc6861e67f3f
---
libavcodec/audiotoolboxenc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/audiotoolboxenc.c b/libavcodec/audiotoolboxenc.c
index cb53f2a..c4d36f5 100644
--- a/libavcodec/audiotoolboxenc.c
+++ b/libavcodec/audiotoolboxenc.c
@@ -288,12 +288,14 @@ 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 (at->mode == kAudioCodecBitRateControlMode_Variable && avctx->rc_max_rate) {
int max_size = avctx->rc_max_rate * avctx->frame_size / avctx->sample_rate;
if (max_size)
AudioConverterSetProperty(at->converter, kAudioCodecPropertyPacketSizeLimitForVBR,
size, &max_size);
}
+#endif
ff_af_queue_init(avctx, &at->afq);
More information about the ffmpeg-cvslog
mailing list