winealsa: Do not access WAVEHDR past DriverCallback.
This commit is contained in:
parent
4cff4c82a1
commit
bdea146639
|
@ -292,15 +292,15 @@ static DWORD CALLBACK widRecorder(LPVOID pmt)
|
||||||
widRecorder_ReadHeaders(wwi);
|
widRecorder_ReadHeaders(wwi);
|
||||||
|
|
||||||
/* return all buffers to the app */
|
/* return all buffers to the app */
|
||||||
for (lpWaveHdr = wwi->lpQueuePtr; lpWaveHdr; lpWaveHdr = lpWaveHdr->lpNext) {
|
while (wwi->lpQueuePtr) {
|
||||||
|
lpWaveHdr = wwi->lpQueuePtr;
|
||||||
TRACE("reset %p %p\n", lpWaveHdr, lpWaveHdr->lpNext);
|
TRACE("reset %p %p\n", lpWaveHdr, lpWaveHdr->lpNext);
|
||||||
|
wwi->lpQueuePtr = lpWaveHdr->lpNext;
|
||||||
lpWaveHdr->dwFlags &= ~WHDR_INQUEUE;
|
lpWaveHdr->dwFlags &= ~WHDR_INQUEUE;
|
||||||
lpWaveHdr->dwFlags |= WHDR_DONE;
|
lpWaveHdr->dwFlags |= WHDR_DONE;
|
||||||
wwi->lpQueuePtr = lpWaveHdr->lpNext;
|
|
||||||
widNotifyClient(wwi, WIM_DATA, (DWORD_PTR)lpWaveHdr, 0);
|
widNotifyClient(wwi, WIM_DATA, (DWORD_PTR)lpWaveHdr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
wwi->lpQueuePtr = NULL;
|
|
||||||
SetEvent(ev);
|
SetEvent(ev);
|
||||||
break;
|
break;
|
||||||
case WINE_WM_CLOSING:
|
case WINE_WM_CLOSING:
|
||||||
|
|
Loading…
Reference in New Issue