Commit 6df92c11 authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Alexandre Julliard

winegstreamer: Use WAVE_FORMAT_PCM when possible for demux.

parent 565ece5e
...@@ -147,8 +147,13 @@ static int amt_from_gst_caps_audio(GstCaps *caps, AM_MEDIA_TYPE *amt) { ...@@ -147,8 +147,13 @@ static int amt_from_gst_caps_audio(GstCaps *caps, AM_MEDIA_TYPE *amt) {
if (!strcmp(typename, "audio/x-raw-float")) { if (!strcmp(typename, "audio/x-raw-float")) {
wfe->SubFormat = KSDATAFORMAT_SUBTYPE_IEEE_FLOAT; wfe->SubFormat = KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
wfx->wBitsPerSample = wfe->Samples.wValidBitsPerSample = 32; wfx->wBitsPerSample = wfe->Samples.wValidBitsPerSample = 32;
} else } else {
wfe->SubFormat = KSDATAFORMAT_SUBTYPE_PCM; wfe->SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
if (wfx->nChannels <= 2 && bpp <= 16 && depth == bpp) {
wfx->wFormatTag = WAVE_FORMAT_PCM;
wfx->cbSize = 0;
}
}
wfx->nBlockAlign = wfx->nChannels * wfx->wBitsPerSample/8; wfx->nBlockAlign = wfx->nChannels * wfx->wBitsPerSample/8;
wfx->nAvgBytesPerSec = wfx->nSamplesPerSec * wfx->nBlockAlign; wfx->nAvgBytesPerSec = wfx->nSamplesPerSec * wfx->nBlockAlign;
return 1; return 1;
......
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