[FFmpeg-cvslog] lavc/audiotoolbox: fix build failure on osx 10.5 (v3)

Pavel Koshevoy git at videolan.org
Sun Jul 16 01:58:01 EEST 2023


ffmpeg | branch: master | Pavel Koshevoy <pkoshevoy at gmail.com> | Sat Jul 15 13:36:03 2023 -0600| [35342dc390781f310daa53e6c850285863ab5829] | committer: James Almer

lavc/audiotoolbox: fix build failure on osx 10.5 (v3)

Reviewed-by: Marvin Scholz <epirat07 at gmail.com>
Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=35342dc390781f310daa53e6c850285863ab5829
---

 libavcodec/audiotoolboxdec.c | 2 ++
 libavcodec/audiotoolboxenc.c | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/libavcodec/audiotoolboxdec.c b/libavcodec/audiotoolboxdec.c
index 82babe3d31..5456f916cf 100644
--- a/libavcodec/audiotoolboxdec.c
+++ b/libavcodec/audiotoolboxdec.c
@@ -71,10 +71,12 @@ static UInt32 ffat_get_format_id(enum AVCodecID codec, int profile)
         return kAudioFormatAMR;
     case AV_CODEC_ID_EAC3:
         return kAudioFormatEnhancedAC3;
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     case AV_CODEC_ID_GSM_MS:
         return kAudioFormatMicrosoftGSM;
     case AV_CODEC_ID_ILBC:
         return kAudioFormatiLBC;
+#endif
     case AV_CODEC_ID_MP1:
         return kAudioFormatMPEGLayer1;
     case AV_CODEC_ID_MP2:
diff --git a/libavcodec/audiotoolboxenc.c b/libavcodec/audiotoolboxenc.c
index 1ccfda4d20..46aca4c7ff 100644
--- a/libavcodec/audiotoolboxenc.c
+++ b/libavcodec/audiotoolboxenc.c
@@ -69,15 +69,19 @@ static UInt32 ffat_get_format_id(enum AVCodecID codec, int profile)
             return kAudioFormatMPEG4AAC_HE_V2;
         case FF_PROFILE_AAC_LD:
             return kAudioFormatMPEG4AAC_LD;
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
         case FF_PROFILE_AAC_ELD:
             return kAudioFormatMPEG4AAC_ELD;
+#endif
         }
     case AV_CODEC_ID_ADPCM_IMA_QT:
         return kAudioFormatAppleIMA4;
     case AV_CODEC_ID_ALAC:
         return kAudioFormatAppleLossless;
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     case AV_CODEC_ID_ILBC:
         return kAudioFormatiLBC;
+#endif
     case AV_CODEC_ID_PCM_ALAW:
         return kAudioFormatALaw;
     case AV_CODEC_ID_PCM_MULAW:



More information about the ffmpeg-cvslog mailing list