Zebediah Figura : winegstreamer: Use nAvgBytesPerSec to determine buffer size only for raw audio formats.
Alexandre Julliard
julliard at winehq.org
Fri Feb 28 13:54:39 CST 2020
Module: wine
Branch: master
Commit: fe6220dba707aa38ba76e79ddec74b4cbc117310
URL: https://source.winehq.org/git/wine.git/?a=commit;h=fe6220dba707aa38ba76e79ddec74b4cbc117310
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Thu Feb 27 20:40:38 2020 -0600
winegstreamer: Use nAvgBytesPerSec to determine buffer size only for raw audio formats.
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 8b5eb928ce..30f3a59000 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -2070,7 +2070,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;
More information about the wine-cvs
mailing list