Commit 3209f949 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Fixed size of buffers in conversion.

parent 1e538933
......@@ -233,10 +233,18 @@ static DWORD wodWrite(WAVEMAPDATA* wom, LPWAVEHDR lpWaveHdrSrc, DWORD dwParam2)
lpWaveHdrSrc->dwFlags |= WHDR_INQUEUE;
ash = (PACMSTREAMHEADER)lpWaveHdrSrc->reserved;
/* acmStreamConvert will actually check that the new size is less than initial size */
ash->cbSrcLength = lpWaveHdrSrc->dwBufferLength;
if (acmStreamConvert(wom->hAcmStream, ash, 0L) != MMSYSERR_NOERROR)
return MMSYSERR_ERROR;
lpWaveHdrDst = (LPWAVEHDR)((LPSTR)ash + sizeof(ACMSTREAMHEADER));
if (ash->cbDstLengthUsed == 0)
{
/* something went wrong in decoding */
FIXME("Got 0 length\n");
return MMSYSERR_ERROR;
}
lpWaveHdrDst->dwBufferLength = ash->cbDstLengthUsed;
return waveOutWrite(wom->hInnerWave, lpWaveHdrDst, sizeof(*lpWaveHdrDst));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment