Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
63f9aaea
Commit
63f9aaea
authored
Sep 09, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Keep start time in the async_reader struct.
parent
e0045a31
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
wm_asyncreader.c
dlls/winegstreamer/wm_asyncreader.c
+7
-6
No files found.
dlls/winegstreamer/wm_asyncreader.c
View file @
63f9aaea
...
...
@@ -60,6 +60,7 @@ struct async_reader
IWMReaderCallback
*
callback
;
void
*
context
;
REFERENCE_TIME
clock_start
;
LARGE_INTEGER
clock_frequency
;
HANDLE
callback_thread
;
...
...
@@ -85,7 +86,6 @@ static void callback_thread_run(struct async_reader *reader)
{
IWMReaderCallbackAdvanced
*
callback_advanced
=
reader
->
callback_advanced
;
IWMReaderCallback
*
callback
=
reader
->
callback
;
REFERENCE_TIME
start_time
;
struct
wm_stream
*
stream
;
static
const
DWORD
zero
;
QWORD
pts
,
duration
;
...
...
@@ -94,8 +94,6 @@ static void callback_thread_run(struct async_reader *reader)
HRESULT
hr
=
S_OK
;
DWORD
flags
;
start_time
=
get_current_time
(
reader
);
while
(
reader
->
running
&&
list_empty
(
&
reader
->
async_ops
))
{
LeaveCriticalSection
(
&
reader
->
callback_cs
);
...
...
@@ -124,13 +122,13 @@ static void callback_thread_run(struct async_reader *reader)
{
while
(
reader
->
running
&&
list_empty
(
&
reader
->
async_ops
))
{
REFERENCE_TIME
current_time
=
get_current_time
(
reader
);
REFERENCE_TIME
current_time
=
get_current_time
(
reader
)
-
reader
->
clock_start
;
if
(
pts
<=
current_time
-
start_time
)
if
(
pts
<=
current_time
)
break
;
SleepConditionVariableCS
(
&
reader
->
callback_cv
,
&
reader
->
callback_cs
,
(
pts
-
(
current_time
-
start_time
)
)
/
10000
);
(
pts
-
current_time
)
/
10000
);
}
}
...
...
@@ -208,7 +206,10 @@ static DWORD WINAPI async_reader_callback_thread(void *arg)
{
reader
->
context
=
op
->
u
.
start
.
context
;
if
(
SUCCEEDED
(
hr
))
{
wm_reader_seek
(
&
reader
->
reader
,
op
->
u
.
start
.
start
,
op
->
u
.
start
.
duration
);
reader
->
clock_start
=
get_current_time
(
reader
);
}
LeaveCriticalSection
(
&
reader
->
callback_cs
);
IWMReaderCallback_OnStatus
(
reader
->
callback
,
WMT_STARTED
,
hr
,
...
...
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