Skip to content

Commit 23ca340

Browse files
committed
Didn't realize the return type for the callback function was different
for HAVE_THREADS path
1 parent a70ab4d commit 23ca340

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

audio/common/mmdevice_common.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,11 @@ DWORD CALLBACK mmdevice_thread(PVOID data)
130130

131131
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
132132
if (FAILED(hr))
133+
#ifdef HAVE_THREADS
134+
return;
135+
#else
133136
return 0;
137+
#endif
134138

135139
#ifdef __cplusplus
136140
hr = CoCreateInstance(CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL,
@@ -196,8 +200,10 @@ DWORD CALLBACK mmdevice_thread(PVOID data)
196200
IMMNotificationThreadId = 0;
197201
CoUninitialize();
198202
ExitThread(0);
203+
#ifndef HAVE_THREADS
199204
return 0;
200205
#endif
206+
#endif
201207
}
202208

203209
static const char *mmdevice_data_flow_name(unsigned data_flow)

0 commit comments

Comments
 (0)