From 4e0c3707c3af8019db2c41ed6287bdde6e0b6fd3 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Thu, 1 Jun 2017 14:16:43 -0500 Subject: [PATCH] msacm32: Don't write cbSize if the format is WAVE_FORMAT_PCM. Signed-off-by: Zebediah Figura Signed-off-by: Andrew Eikum Signed-off-by: Alexandre Julliard --- dlls/msacm32/format.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/msacm32/format.c b/dlls/msacm32/format.c index de07cba9a3..3f3ee5492d 100644 --- a/dlls/msacm32/format.c +++ b/dlls/msacm32/format.c @@ -78,7 +78,8 @@ static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid, afd.pwfx = HeapAlloc(MSACM_hHeap, 0, paftd->cbFormatSize); if (!afd.pwfx) return FALSE; afd.pwfx->wFormatTag = paftd->dwFormatTag; - afd.pwfx->cbSize = paftd->cbFormatSize; + if (paftd->dwFormatTag != WAVE_FORMAT_PCM) + afd.pwfx->cbSize = paftd->cbFormatSize - sizeof(WAVEFORMATEX); afd.cbwfx = paftd->cbFormatSize; for (i = 0; i < paftd->cStandardFormats; i++) {