From ab908c4162a4f5455d840c9ed4231e690d7baebc Mon Sep 17 00:00:00 2001 From: Waldeck Schutzer Date: Thu, 23 Jan 2003 21:21:02 +0000 Subject: [PATCH] Make sure the parameter phas is correct by setting it equal to NULL in query mode. --- dlls/msacm/stream.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/msacm/stream.c b/dlls/msacm/stream.c index 498aa47174..6509207c06 100644 --- a/dlls/msacm/stream.c +++ b/dlls/msacm/stream.c @@ -147,7 +147,12 @@ MMRESULT WINAPI acmStreamOpen(PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pw pwfxDst->wFormatTag, pwfxDst->nChannels, pwfxDst->nSamplesPerSec, pwfxDst->nAvgBytesPerSec, pwfxDst->nBlockAlign, pwfxDst->wBitsPerSample, pwfxDst->cbSize); - if ((fdwOpen & ACM_STREAMOPENF_QUERY) && phas) return MMSYSERR_INVALPARAM; + /* (WS) In query mode, phas should be NULL. If it is not, then instead + * of returning an error we are making sure it is NULL, preventing some + * applications that pass garbage for phas from crashing. + */ + if (fdwOpen & ACM_STREAMOPENF_QUERY) phas = NULL; + if (pwfltr && (pwfxSrc->wFormatTag != pwfxDst->wFormatTag)) return MMSYSERR_INVALPARAM; wfxSrcSize = wfxDstSize = sizeof(WAVEFORMATEX); -- 2.32.0.93.g670b81a890