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
2bf3a585
Commit
2bf3a585
authored
Apr 06, 2022
by
Andrew Eikum
Committed by
Alexandre Julliard
Apr 06, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr/presenter: Place early samples back to the front of the queue.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
09572681
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
presenter.c
dlls/evr/presenter.c
+10
-5
No files found.
dlls/evr/presenter.c
View file @
2bf3a585
...
...
@@ -429,15 +429,20 @@ static HRESULT video_presenter_sample_queue_init(struct video_presenter *present
return
S_OK
;
}
static
void
video_presenter_sample_queue_push
(
struct
video_presenter
*
presenter
,
IMFSample
*
sample
)
static
void
video_presenter_sample_queue_push
(
struct
video_presenter
*
presenter
,
IMFSample
*
sample
,
BOOL
at_front
)
{
struct
sample_queue
*
queue
=
&
presenter
->
thread
.
queue
;
unsigned
int
idx
;
EnterCriticalSection
(
&
presenter
->
cs
);
if
(
queue
->
used
!=
queue
->
size
)
{
queue
->
back
=
(
queue
->
back
+
1
)
%
queue
->
size
;
queue
->
samples
[
queue
->
back
]
=
sample
;
if
(
at_front
)
idx
=
queue
->
front
=
(
queue
->
size
+
queue
->
front
-
1
)
%
queue
->
size
;
else
idx
=
queue
->
back
=
(
queue
->
back
+
1
)
%
queue
->
size
;
queue
->
samples
[
idx
]
=
sample
;
queue
->
used
++
;
IMFSample_AddRef
(
sample
);
}
...
...
@@ -556,7 +561,7 @@ static void video_presenter_check_queue(struct video_presenter *presenter,
if
(
present
)
video_presenter_sample_present
(
presenter
,
sample
);
else
video_presenter_sample_queue_push
(
presenter
,
sample
);
video_presenter_sample_queue_push
(
presenter
,
sample
,
TRUE
);
IMFSample_Release
(
sample
);
...
...
@@ -580,7 +585,7 @@ static void video_presenter_schedule_sample(struct video_presenter *presenter, I
if
(
presenter
->
clock
)
{
video_presenter_sample_queue_push
(
presenter
,
sample
);
video_presenter_sample_queue_push
(
presenter
,
sample
,
FALSE
);
PostThreadMessageW
(
presenter
->
thread
.
tid
,
EVRM_PRESENT
,
0
,
0
);
}
else
...
...
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