[vlc-commits] [Git][videolan/vlc][master] wasapi: replace assert with error check
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Tue Jul 19 09:13:42 UTC 2022
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
fa32d2b0 by Thomas Guillem at 2022-07-19T08:55:46+00:00
wasapi: replace assert with error check
"The COM MTA must have been initialised earlier (and not deinitialised
since) for the assertion to be correct."
- - - - -
1 changed file:
- modules/audio_output/wasapi.c
Changes:
=====================================
modules/audio_output/wasapi.c
=====================================
@@ -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);
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/fa32d2b043a8ddf48b61c3db444897fc0b56e99f
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/fa32d2b043a8ddf48b61c3db444897fc0b56e99f
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list