diff options
author | xufuji456 <839789740@qq.com> | 2023-12-09 20:50:59 +0800 |
---|---|---|
committer | Thilo Borgmann <thilo.borgmann@mail.de> | 2023-12-11 16:39:21 +0100 |
commit | 341a483b0868d30d17bf8d5e82facb5e0944a6fe (patch) | |
tree | 7d2ef868a1a516d0971596bc30c1392afe03cca9 | |
parent | 185871fdd39762295973c1f3db1459e04121317c (diff) | |
download | ffmpeg-341a483b0868d30d17bf8d5e82facb5e0944a6fe.tar.gz |
avdevice/audiotoolbox: silence warning with new api
Building with macOS platform, the compiler has a warning: 'kAudioObjectPropertyElementMaster' is deprecated in macOS 12.0
Signed-off-by: xufuji456 <839789740@qq.com>
-rw-r--r-- | libavdevice/audiotoolbox.m | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavdevice/audiotoolbox.m b/libavdevice/audiotoolbox.m index aa49e2c992..ae91a2bc62 100644 --- a/libavdevice/audiotoolbox.m +++ b/libavdevice/audiotoolbox.m @@ -85,7 +85,11 @@ static av_cold int at_write_header(AVFormatContext *avctx) AudioObjectPropertyAddress prop; prop.mSelector = kAudioHardwarePropertyDevices; prop.mScope = kAudioObjectPropertyScopeGlobal; +#if !TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1200 + prop.mElement = kAudioObjectPropertyElementMain; +#else prop.mElement = kAudioObjectPropertyElementMaster; +#endif err = AudioObjectGetPropertyDataSize(kAudioObjectSystemObject, &prop, 0, NULL, &data_size); if (check_status(avctx, &err, "AudioObjectGetPropertyDataSize devices")) return AVERROR(EINVAL); |