Zebediah Figura : msacm32: Don' t write cbSize if the format is WAVE_FORMAT_PCM.

Alexandre Julliard julliard at winehq.org
Fri Jun 2 17:03:27 CDT 2017


Module: wine
Branch: master
Commit: 4e0c3707c3af8019db2c41ed6287bdde6e0b6fd3
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4e0c3707c3af8019db2c41ed6287bdde6e0b6fd3

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Thu Jun  1 14:16:43 2017 -0500

msacm32: Don't write cbSize if the format is WAVE_FORMAT_PCM.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 de07cba..3f3ee54 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++) {




More information about the wine-cvs mailing list