Commit 1052d5cf authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

winegstreamer: Allow converting to 16-bit 2-channel PCM within the splitter filter.

parent 11b30ffc
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment