[PATCH 4/4] winegstreamer: Use nAvgBytesPerSec to determine buffer size only for raw audio formats.
Zebediah Figura
z.figura12 at gmail.com
Wed Feb 26 16:31:38 CST 2020
Fixes: 6745afd81d38e26b8890bd97163eb1e4494c6cb1
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
dlls/winegstreamer/gstdemux.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index 02bf69cacd9..3f06016f963 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -2068,7 +2068,9 @@ static HRESULT WINAPI GSTOutPin_DecideBufferSize(struct strmbase_source *iface,
VIDEOINFOHEADER *format = (VIDEOINFOHEADER *)pin->pin.pin.mt.pbFormat;
buffer_size = format->bmiHeader.biSizeImage;
}
- else if (IsEqualGUID(&pin->pin.pin.mt.formattype, &FORMAT_WaveFormatEx))
+ else if (IsEqualGUID(&pin->pin.pin.mt.formattype, &FORMAT_WaveFormatEx)
+ && (IsEqualGUID(&pin->pin.pin.mt.subtype, &MEDIASUBTYPE_PCM)
+ || IsEqualGUID(&pin->pin.pin.mt.subtype, &MEDIASUBTYPE_IEEE_FLOAT)))
{
WAVEFORMATEX *format = (WAVEFORMATEX *)pin->pin.pin.mt.pbFormat;
buffer_size = format->nAvgBytesPerSec;
--
2.25.0
More information about the wine-devel
mailing list