Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
5ca1d28e
Commit
5ca1d28e
authored
Mar 16, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Clamp both timestamp and timestamp + diff to 0.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
38c50751
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
gstdemux.c
dlls/winegstreamer/gstdemux.c
+13
-4
No files found.
dlls/winegstreamer/gstdemux.c
View file @
5ca1d28e
...
...
@@ -1965,6 +1965,8 @@ static HRESULT WINAPI GST_QualityControl_Notify(IQualityControl *iface, IBaseFil
{
struct
gstdemux_source
*
pin
=
impl_from_IQualityControl
(
iface
);
GstQOSType
type
=
GST_QOS_TYPE_OVERFLOW
;
GstClockTime
timestamp
;
GstClockTimeDiff
diff
;
GstEvent
*
evt
;
TRACE
(
"(%p)->(%p, { 0x%x %u %s %s })
\n
"
,
pin
,
sender
,
...
...
@@ -1974,16 +1976,23 @@ static HRESULT WINAPI GST_QualityControl_Notify(IQualityControl *iface, IBaseFil
mark_wine_thread
();
if
(
qm
.
Type
==
Flood
)
qm
.
Late
=
0
;
/* 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
);
/* DirectShow filters sometimes pass negative timestamps (Audiosurf uses the
* current time instead of the time of the last buffer). GstClockTime is
* unsigned, so clamp it to 0. */
timestamp
=
max
(
qm
.
TimeStamp
*
100
,
0
);
/* The documentation specifies that timestamp + diff must be nonnegative. */
diff
=
qm
.
Late
*
100
;
if
(
timestamp
<
-
diff
)
diff
=
-
timestamp
;
evt
=
gst_event_new_qos
(
type
,
qm
.
Proportion
/
1000
.
0
,
diff
,
timestamp
);
if
(
!
evt
)
{
WARN
(
"Failed to create QOS event
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment