From 7979421cbf9ba2ece81ef1269b76c2ba022ab712 Mon Sep 17 00:00:00 2001 From: jcm <6864788+jcm93@users.noreply.github.com> Date: Fri, 1 Nov 2024 20:17:09 -0500 Subject: [PATCH] mac-capture: Don't read channels for disconnected audio device Co-authored-by: PatTheMav --- plugins/mac-capture/mac-audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mac-capture/mac-audio.c b/plugins/mac-capture/mac-audio.c index cc03c3bc2236b0..6840166511e5e1 100644 --- a/plugins/mac-capture/mac-audio.c +++ b/plugins/mac-capture/mac-audio.c @@ -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);