diff options
author | Kevin Mitchell <kevmitch@gmail.com> | 2014-11-28 07:50:34 -0800 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2014-11-28 10:52:48 -0800 |
commit | b0854bc42c87ab8d88af4485b1fcdc7f286cdbb3 (patch) | |
tree | e18f62064346115995e0c0fd3b5cf33697d219d6 /audio | |
parent | 8908b80b7720b27aeb056ff64d8f29550850efc7 (diff) | |
download | mpv-b0854bc42c87ab8d88af4485b1fcdc7f286cdbb3.tar.bz2 mpv-b0854bc42c87ab8d88af4485b1fcdc7f286cdbb3.tar.xz |
ao/wasapi: more consistent/reliable method of computing extra WAVEFORMATEXTENSIBLE size
Diffstat (limited to 'audio')
-rwxr-xr-x | audio/out/ao_wasapi_utils.c | 3 |
1 files changed, 1 insertions, 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 |