Skip to content

Commit a9e8a93

Browse files
committed
captions: Give stop event priority over processing
Switch priority order of stop and processing events, so caption thread can quit iwhen both events are set.
1 parent a948fdf commit a9e8a93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

frontend/plugins/frontend-tools/captions-mssapi.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ try {
109109
if (FAILED(hr))
110110
throw HRError("SetRecoState(SPRST_ACTIVE) failed", hr);
111111

112-
HANDLE events[] = {notify, stop};
112+
HANDLE events[] = {stop, notify};
113113

114114
started = true;
115115

116116
for (;;) {
117117
DWORD ret = WaitForMultipleObjects(2, events, false, INFINITE);
118-
if (ret != WAIT_OBJECT_0)
118+
if (ret != WAIT_OBJECT_0 + 1)
119119
break;
120120

121121
CSpEvent event;

0 commit comments

Comments
 (0)