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
8803a81b
Commit
8803a81b
authored
Jul 20, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Jul 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Wait for presentation time after rendering the first sample.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e4ebf09f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
9 deletions
+27
-9
renderer.c
dlls/strmbase/renderer.c
+27
-9
No files found.
dlls/strmbase/renderer.c
View file @
8803a81b
...
...
@@ -170,13 +170,16 @@ static HRESULT WINAPI BaseRenderer_Receive(struct strmbase_sink *pin, IMediaSamp
{
struct
strmbase_renderer
*
filter
=
impl_from_IPin
(
&
pin
->
pin
.
IPin_iface
);
REFERENCE_TIME
start
,
stop
;
BOOL
need_wait
=
FALSE
;
FILTER_STATE
state
;
HRESULT
hr
=
S_OK
;
AM_MEDIA_TYPE
*
mt
;
HRESULT
hr
;
if
(
filter
->
eos
||
filter
->
sink
.
flushing
)
return
S_FALSE
;
if
(
filter
->
filter
.
state
==
State_Stopped
)
state
=
filter
->
filter
.
state
;
if
(
state
==
State_Stopped
)
return
VFW_E_WRONG_STATE
;
if
(
IMediaSample_GetMediaType
(
sample
,
&
mt
)
==
S_OK
)
...
...
@@ -195,11 +198,24 @@ static HRESULT WINAPI BaseRenderer_Receive(struct strmbase_sink *pin, IMediaSamp
if
(
filter
->
filter
.
clock
&&
SUCCEEDED
(
IMediaSample_GetTime
(
sample
,
&
start
,
&
stop
)))
{
strmbase_passthrough_update_time
(
&
filter
->
passthrough
,
start
);
need_wait
=
TRUE
;
}
else
start
=
stop
=
-
1
;
if
(
state
==
State_Paused
)
{
QualityControlRender_BeginRender
(
&
filter
->
qc
,
start
,
stop
);
hr
=
filter
->
pFuncsTable
->
pfnDoRenderSample
(
filter
,
sample
);
QualityControlRender_EndRender
(
&
filter
->
qc
);
}
if
(
need_wait
)
{
REFERENCE_TIME
now
;
DWORD_PTR
cookie
;
strmbase_passthrough_update_time
(
&
filter
->
passthrough
,
start
);
IReferenceClock_GetTime
(
filter
->
filter
.
clock
,
&
now
);
if
(
now
-
filter
->
stream_start
-
start
<=
-
10000
)
...
...
@@ -224,12 +240,14 @@ static HRESULT WINAPI BaseRenderer_Receive(struct strmbase_sink *pin, IMediaSamp
EnterCriticalSection
(
&
filter
->
csRenderLock
);
}
}
else
start
=
stop
=
-
1
;
QualityControlRender_BeginRender
(
&
filter
->
qc
,
start
,
stop
);
hr
=
filter
->
pFuncsTable
->
pfnDoRenderSample
(
filter
,
sample
);
QualityControlRender_EndRender
(
&
filter
->
qc
);
if
(
state
==
State_Running
)
{
QualityControlRender_BeginRender
(
&
filter
->
qc
,
start
,
stop
);
hr
=
filter
->
pFuncsTable
->
pfnDoRenderSample
(
filter
,
sample
);
QualityControlRender_EndRender
(
&
filter
->
qc
);
}
QualityControlRender_DoQOS
(
&
filter
->
qc
);
LeaveCriticalSection
(
&
filter
->
csRenderLock
);
...
...
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