[PATCH v2] msacm32: Don't write cbSize if the format is WAVE_FORMAT_PCM.
Zebediah Figura
z.figura12 at gmail.com
Thu Jun 1 10:55:55 CDT 2017
WAVE_FORMAT_PCM uses PCMWAVEFORMAT, which lacks the cbSize member.
Fixes https://bugs.winehq.org/show_bug.cgi?id=26388
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
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..c38f8933fe 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;
afd.cbwfx = paftd->cbFormatSize;
for (i = 0; i < paftd->cStandardFormats; i++) {
--
2.13.0
More information about the wine-patches
mailing list