Zebediah Figura : winegstreamer: Also use GST_QOS_TYPE_OVERFLOW for samples that arrive on time.
Module: wine Branch: stable Commit: ebcc2fa5adbe8c245d36bf5a8336d05136342821 URL: https://source.winehq.org/git/wine.git/?a=commit;h=ebcc2fa5adbe8c245d36bf5a8... Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Mar 16 21:28:25 2020 -0500 winegstreamer: Also use GST_QOS_TYPE_OVERFLOW for samples that arrive on time. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 38c50751fe0a5ca104ca17728a3db95d95900243) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/winegstreamer/gstdemux.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 7ae70d0a73..cbded6abf5 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -1785,6 +1785,7 @@ static ULONG WINAPI GST_QualityControl_Release(IQualityControl *iface) static HRESULT WINAPI GST_QualityControl_Notify(IQualityControl *iface, IBaseFilter *sender, Quality qm) { struct gstdemux_source *pin = impl_from_IQualityControl(iface); + GstQOSType type = GST_QOS_TYPE_OVERFLOW; GstEvent *evt; TRACE("(%p)->(%p, { 0x%x %u %s %s })\n", pin, sender, @@ -1797,8 +1798,13 @@ static HRESULT WINAPI GST_QualityControl_Notify(IQualityControl *iface, IBaseFil if (qm.Type == Flood) qm.Late = 0; - evt = gst_event_new_qos(qm.Type == Famine ? GST_QOS_TYPE_UNDERFLOW : GST_QOS_TYPE_OVERFLOW, - qm.Proportion / 1000., qm.Late * 100, qm.TimeStamp * 100); + /* GSTQOS_TYPE_OVERFLOW is also used for buffers that arrive on time, but + * DirectShow filters might use Famine, so check that there actually is an + * underrun. */ + if (qm.Type == Famine && qm.Proportion > 1000) + type = GST_QOS_TYPE_UNDERFLOW; + + evt = gst_event_new_qos(type, qm.Proportion / 1000.0, qm.Late * 100, qm.TimeStamp * 100); if (!evt) { WARN("Failed to create QOS event\n");
participants (1)
-
Alexandre Julliard