From 6df92c11cabfd7d8c1289afe81442c7cb7669d03 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Tue, 13 Sep 2011 15:32:31 +0200 Subject: [PATCH] winegstreamer: Use WAVE_FORMAT_PCM when possible for demux. --- dlls/winegstreamer/gstdemux.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 6670d6b7934..655a9f2e6fe 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -147,8 +147,13 @@ static int amt_from_gst_caps_audio(GstCaps *caps, AM_MEDIA_TYPE *amt) { if (!strcmp(typename, "audio/x-raw-float")) { wfe->SubFormat = KSDATAFORMAT_SUBTYPE_IEEE_FLOAT; wfx->wBitsPerSample = wfe->Samples.wValidBitsPerSample = 32; - } else + } else { 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->nAvgBytesPerSec = wfx->nSamplesPerSec * wfx->nBlockAlign; return 1;