Maarten Lankhorst : winegstreamer: Do not allow timestamp + late to go negative in QOS messages.
Alexandre Julliard
julliard at winehq.org
Thu Nov 25 11:18:52 CST 2010
Module: wine
Branch: master
Commit: 3213061ebd45199c1fa9e44a257a530f924946ce
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3213061ebd45199c1fa9e44a257a530f924946ce
Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date: Wed Nov 24 18:23:56 2010 +0100
winegstreamer: Do not allow timestamp + late to go negative in QOS messages.
---
dlls/winegstreamer/gstdemux.c | 5 ++++-
dlls/winegstreamer/gsttffilter.c | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index 7c2398b..270c93a 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -1387,7 +1387,10 @@ static const IMediaSeekingVtbl GST_Seeking_Vtbl =
static HRESULT WINAPI GST_QualityControl_Notify(IQualityControl *iface, IBaseFilter *sender, Quality qm) {
QualityControlImpl *This = (QualityControlImpl*)iface;
GSTOutPin *pin = (GSTOutPin*)This->self;
- gst_pad_push_event(pin->my_sink, gst_event_new_qos(1000./qm.Proportion, qm.Late*100, qm.TimeStamp*100));
+ REFERENCE_TIME late = qm.Late;
+ if (qm.Late < 0 && -qm.Late > qm.TimeStamp)
+ late = -qm.TimeStamp;
+ gst_pad_push_event(pin->my_sink, gst_event_new_qos(1000./qm.Proportion, late*100, qm.TimeStamp*100));
return S_OK;
}
diff --git a/dlls/winegstreamer/gsttffilter.c b/dlls/winegstreamer/gsttffilter.c
index 912439e..b85ab43 100644
--- a/dlls/winegstreamer/gsttffilter.c
+++ b/dlls/winegstreamer/gsttffilter.c
@@ -437,7 +437,10 @@ static HRESULT WINAPI Gstreamer_transform_NewSegment(TransformFilter *iface, REF
static HRESULT WINAPI Gstreamer_transform_QOS(TransformFilter *iface, IBaseFilter *sender, Quality qm) {
GstTfImpl *This = (GstTfImpl*)iface;
- gst_pad_push_event(This->my_sink, gst_event_new_qos(1000. / qm.Proportion, qm.Late * 100, qm.TimeStamp * 100));
+ REFERENCE_TIME late = qm.Late;
+ if (qm.Late < 0 && -qm.Late > qm.TimeStamp)
+ late = -qm.TimeStamp;
+ gst_pad_push_event(This->my_sink, gst_event_new_qos(1000. / qm.Proportion, late * 100, qm.TimeStamp * 100));
return QualityControlImpl_Notify((IQualityControl*)&iface->qcimpl, sender, qm);
}
More information about the wine-cvs
mailing list