mac-capture: Don't read channels for disconnected audio device

Co-authored-by: PatTheMav <patthemav+github@gmail.com>
This commit is contained in:
jcm
2024-11-01 20:17:09 -05:00
committed by Ryan Foster
parent b854f61a1d
commit 7979421cbf

View File

@@ -1007,7 +1007,7 @@ static obs_properties_t *coreaudio_properties(bool input, void *data)
property = obs_properties_add_bool(props, "enable_downmix", obs_module_text("CoreAudio.Downmix"));
obs_property_set_modified_callback2(property, coreaudio_downmix_changed, ca);
if (ca != NULL) {
if (ca != NULL && ca->au_initialized) {
uint32_t channels = get_audio_channels(ca->speakers);
ensure_output_channels_visible(props, ca, channels);