mirror of https://git.ffmpeg.org/ffmpeg.git
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>
This commit is contained in:
parent
185871fdd3
commit
341a483b08
|
@ -85,7 +85,11 @@ static av_cold int at_write_header(AVFormatContext *avctx)
|
||||||
AudioObjectPropertyAddress prop;
|
AudioObjectPropertyAddress prop;
|
||||||
prop.mSelector = kAudioHardwarePropertyDevices;
|
prop.mSelector = kAudioHardwarePropertyDevices;
|
||||||
prop.mScope = kAudioObjectPropertyScopeGlobal;
|
prop.mScope = kAudioObjectPropertyScopeGlobal;
|
||||||
|
#if !TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1200
|
||||||
|
prop.mElement = kAudioObjectPropertyElementMain;
|
||||||
|
#else
|
||||||
prop.mElement = kAudioObjectPropertyElementMaster;
|
prop.mElement = kAudioObjectPropertyElementMaster;
|
||||||
|
#endif
|
||||||
err = AudioObjectGetPropertyDataSize(kAudioObjectSystemObject, &prop, 0, NULL, &data_size);
|
err = AudioObjectGetPropertyDataSize(kAudioObjectSystemObject, &prop, 0, NULL, &data_size);
|
||||||
if (check_status(avctx, &err, "AudioObjectGetPropertyDataSize devices"))
|
if (check_status(avctx, &err, "AudioObjectGetPropertyDataSize devices"))
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
|
|
Loading…
Reference in New Issue