From b0854bc42c87ab8d88af4485b1fcdc7f286cdbb3 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Fri, 28 Nov 2014 07:50:34 -0800 Subject: [PATCH] ao/wasapi: more consistent/reliable method of computing extra WAVEFORMATEXTENSIBLE size --- audio/out/ao_wasapi_utils.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/audio/out/ao_wasapi_utils.c b/audio/out/ao_wasapi_utils.c index d491f017ea..8a57c8660b 100755 --- a/audio/out/ao_wasapi_utils.c +++ b/audio/out/ao_wasapi_utils.c @@ -172,8 +172,7 @@ static void set_format(WAVEFORMATEXTENSIBLE *wformat, WORD bytepersample, wformat->Format.nAvgBytesPerSec = samplerate * block_align; wformat->Format.nBlockAlign = block_align; wformat->Format.wBitsPerSample = bytepersample * 8; - wformat->Format.cbSize = - 22; /* must be at least 22 for WAVE_FORMAT_EXTENSIBLE */ + wformat->Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX); if (bytepersample == 4) wformat->SubFormat = mp_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT; else