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
4e8d7ece
Commit
4e8d7ece
authored
Oct 04, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Return earlier for clock state change calls when time source is not set.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3bd1e1ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
session.c
dlls/mf/session.c
+3
-0
mf.c
dlls/mf/tests/mf.c
+17
-4
No files found.
dlls/mf/session.c
View file @
4e8d7ece
...
...
@@ -1923,6 +1923,9 @@ static HRESULT clock_change_state(struct presentation_clock *clock, enum clock_c
MFTIME
system_time
;
HRESULT
hr
;
if
(
!
clock
->
time_source
)
return
MF_E_CLOCK_NO_TIME_SOURCE
;
if
(
command
!=
CLOCK_CMD_SET_RATE
&&
clock
->
state
==
states
[
command
]
&&
clock
->
state
!=
MFCLOCK_STATE_RUNNING
)
return
MF_E_CLOCK_STATE_ALREADY_SET
;
...
...
dlls/mf/tests/mf.c
View file @
4e8d7ece
...
...
@@ -1501,6 +1501,9 @@ static void test_presentation_clock(void)
hr
=
MFCreatePresentationClock
(
&
clock
);
ok
(
hr
==
S_OK
,
"Failed to create presentation clock, hr %#x.
\n
"
,
hr
);
hr
=
IMFPresentationClock_QueryInterface
(
clock
,
&
IID_IMFRateControl
,
(
void
**
)
&
rate_control
);
ok
(
hr
==
S_OK
,
"Failed to get rate control interface, hr %#x.
\n
"
,
hr
);
hr
=
IMFPresentationClock_GetTimeSource
(
clock
,
&
time_source
);
ok
(
hr
==
MF_E_CLOCK_NO_TIME_SOURCE
,
"Unexpected hr %#x.
\n
"
,
hr
);
...
...
@@ -1521,7 +1524,7 @@ static void test_presentation_clock(void)
value
=
1
;
hr
=
IMFPresentationClock_GetContinuityKey
(
clock
,
&
value
);
ok
(
hr
==
S_OK
,
"
Unexpected
hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Failed to get continuity key,
hr %#x.
\n
"
,
hr
);
ok
(
value
==
0
,
"Unexpected value %u.
\n
"
,
value
);
hr
=
IMFPresentationClock_GetProperties
(
clock
,
&
props
);
...
...
@@ -1559,6 +1562,19 @@ static void test_presentation_clock(void)
hr
=
IMFPresentationClock_RemoveClockStateSink
(
clock
,
&
test_sink
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
/* State change commands, time source is not set yet. */
hr
=
IMFPresentationClock_Start
(
clock
,
0
);
ok
(
hr
==
MF_E_CLOCK_NO_TIME_SOURCE
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFPresentationClock_Pause
(
clock
);
ok
(
hr
==
MF_E_CLOCK_NO_TIME_SOURCE
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFPresentationClock_Stop
(
clock
);
ok
(
hr
==
MF_E_CLOCK_NO_TIME_SOURCE
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFRateControl_SetRate
(
rate_control
,
FALSE
,
0
.
0
f
);
ok
(
hr
==
MF_E_CLOCK_NO_TIME_SOURCE
,
"Unexpected hr %#x.
\n
"
,
hr
);
/* Set default time source. */
hr
=
MFCreateSystemTimeSource
(
&
time_source
);
ok
(
hr
==
S_OK
,
"Failed to create time source, hr %#x.
\n
"
,
hr
);
...
...
@@ -1631,9 +1647,6 @@ static void test_presentation_clock(void)
IMFPresentationTimeSource_Release
(
time_source
);
hr
=
IMFPresentationClock_QueryInterface
(
clock
,
&
IID_IMFRateControl
,
(
void
**
)
&
rate_control
);
ok
(
hr
==
S_OK
,
"Failed to get rate control interface, hr %#x.
\n
"
,
hr
);
hr
=
IMFRateControl_GetRate
(
rate_control
,
NULL
,
&
rate
);
ok
(
hr
==
S_OK
,
"Failed to get clock rate, hr %#x.
\n
"
,
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