Skip to content
Snippets Groups Projects
Commit fa32d2b0 authored by Thomas Guillem's avatar Thomas Guillem Committed by Felix Paul Kühne
Browse files

wasapi: replace assert with error check

"The COM MTA must have been initialised earlier (and not deinitialised
since) for the assertion to be correct."
parent f133190a
No related branches found
No related tags found
1 merge request!2241wasapi: replace assert with error check
Pipeline #243011 passed with stage
in 16 minutes and 25 seconds
......@@ -178,8 +178,11 @@ static void StartDeferredCallback(void *val)
aout_stream_sys_t *sys = s->sys;
HRESULT hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
/* From a timer callback, so it's impossible that COM was init before */
assert(SUCCEEDED(hr));
if (unlikely(FAILED(hr)))
{
msg_Err(s, "cannot initialize COM (error 0x%lX)", hr);
return;
}
hr = IAudioClient_Start(sys->client);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment