winealsa.drv: Initialize correctly the header before adding it to the queue.

This commit is contained in:
Christian Costa 2008-12-18 21:21:45 +01:00 committed by Alexandre Julliard
parent ebf3a680c7
commit c983cd6423
1 changed files with 3 additions and 0 deletions

View File

@ -578,7 +578,10 @@ static DWORD midAddBuffer(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
if (!(lpMidiHdr->dwFlags & MHDR_PREPARED)) return MIDIERR_UNPREPARED;
EnterCriticalSection(&crit_sect);
lpMidiHdr->dwFlags &= ~WHDR_DONE;
lpMidiHdr->dwFlags |= MHDR_INQUEUE;
lpMidiHdr->dwBytesRecorded = 0;
lpMidiHdr->lpNext = 0;
if (MidiInDev[wDevID].lpQueueHdr == 0) {
MidiInDev[wDevID].lpQueueHdr = lpMidiHdr;
} else {