diff options
author | Kevin Mitchell <kevmitch@gmail.com> | 2014-11-28 07:50:34 -0800 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-01-25 17:00:11 +0900 |
commit | ad2a461a09518876950111d524cac79c5470e80d (patch) | |
tree | e52f80c93069971708897508ebba8b07f63f6610 | |
parent | 2e931b34f40ef8775c96ea9f4a63fa48ae04ead7 (diff) | |
download | mpv-ad2a461a09518876950111d524cac79c5470e80d.tar.bz2 mpv-ad2a461a09518876950111d524cac79c5470e80d.tar.xz |
ao/wasapi: more consistent/reliable method of computing extra WAVEFORMATEXTENSIBLE size
-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 |