Module: wine Branch: master Commit: 1052d5cfb1b2dc4a2833fc2d66b14a59726433f8 URL: https://source.winehq.org/git/wine.git/?a=commit;h=1052d5cfb1b2dc4a2833fc2d6...
Author: Zebediah Figura z.figura12@gmail.com Date: Mon Jan 27 19:06:56 2020 -0600
winegstreamer: Allow converting to 16-bit 2-channel PCM within the splitter filter.
Signed-off-by: Zebediah Figura z.figura12@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/winegstreamer/gstdemux.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 8e36644030..f9eed906b6 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -1745,6 +1745,24 @@ static HRESULT gstdecoder_source_get_media_type(struct gstdemux_source *pin, * vih->bmiHeader.biHeight * vih->bmiHeader.biBitCount / 8; return S_OK; } + else if (IsEqualGUID(&pin->mt.majortype, &MEDIATYPE_Audio) && index == 1) + { + const WAVEFORMATEX *our_format = (WAVEFORMATEX *)pin->mt.pbFormat; + WAVEFORMATEX *format; + + *mt = pin->mt; + mt->subtype = MEDIASUBTYPE_PCM; + mt->pbFormat = CoTaskMemAlloc(sizeof(WAVEFORMATEX)); + format = (WAVEFORMATEX *)mt->pbFormat; + format->wFormatTag = WAVE_FORMAT_PCM; + format->nChannels = 2; + format->nSamplesPerSec = our_format->nSamplesPerSec; + format->wBitsPerSample = 16; + format->nBlockAlign = 4; + format->nAvgBytesPerSec = format->nSamplesPerSec * 4; + format->cbSize = 0; + return S_OK; + }
return VFW_S_NO_MORE_ITEMS; }