[PATCH v3 resend] msacm32: Don't write cbSize if the format is WAVE_FORMAT_PCM.
Andrew Eikum
aeikum at codeweavers.com
Thu Jun 1 14:38:31 CDT 2017
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
On Thu, Jun 01, 2017 at 02:16:43PM -0500, Zebediah Figura wrote:
> v3: also correctly set cbSize
> 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..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++) {
> --
> 2.13.0
>
>
>
More information about the wine-patches
mailing list