mciseq: Fix error code path in async command execution.
This commit is contained in:
parent
b14a08f388
commit
6dadd15bdf
@ -113,9 +113,6 @@ static DWORD CALLBACK MCI_SCAStarter(LPVOID arg)
|
|||||||
TRACE("In thread after async command (%08x,%u,%08lx,%08lx)\n",
|
TRACE("In thread after async command (%08x,%u,%08lx,%08lx)\n",
|
||||||
sca->wDevID, sca->wMsg, sca->dwParam1, sca->dwParam2);
|
sca->wDevID, sca->wMsg, sca->dwParam1, sca->dwParam2);
|
||||||
HeapFree(GetProcessHeap(), 0, sca);
|
HeapFree(GetProcessHeap(), 0, sca);
|
||||||
ExitThread(ret);
|
|
||||||
WARN("Should not happen ? what's wrong\n");
|
|
||||||
/* should not go after this point */
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,7 +144,7 @@ static DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD_PTR dwParam1,
|
|||||||
|
|
||||||
if ((handle = CreateThread(NULL, 0, MCI_SCAStarter, sca, 0, NULL)) == 0) {
|
if ((handle = CreateThread(NULL, 0, MCI_SCAStarter, sca, 0, NULL)) == 0) {
|
||||||
WARN("Couldn't allocate thread for async command handling, sending synchronously\n");
|
WARN("Couldn't allocate thread for async command handling, sending synchronously\n");
|
||||||
return MCI_SCAStarter(&sca);
|
return MCI_SCAStarter(sca);
|
||||||
}
|
}
|
||||||
SetThreadPriority(handle, THREAD_PRIORITY_TIME_CRITICAL);
|
SetThreadPriority(handle, THREAD_PRIORITY_TIME_CRITICAL);
|
||||||
CloseHandle(handle);
|
CloseHandle(handle);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user