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
9dd5aa17
Commit
9dd5aa17
authored
Jul 14, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Jul 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Return an error code if a filter reports an incorrect state.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a8a644c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
0 deletions
+54
-0
filtergraph.c
dlls/quartz/filtergraph.c
+9
-0
filtergraph.c
dlls/quartz/tests/filtergraph.c
+45
-0
No files found.
dlls/quartz/filtergraph.c
View file @
9dd5aa17
...
...
@@ -4961,6 +4961,15 @@ static HRESULT WINAPI MediaFilter_GetState(IMediaFilter *iface, DWORD timeout, F
hr
=
VFW_S_STATE_INTERMEDIATE
;
else
if
(
filter_hr
!=
S_OK
&&
filter_hr
!=
VFW_S_STATE_INTERMEDIATE
)
hr
=
filter_hr
;
if
(
hr
==
S_OK
&&
filter_state
==
State_Paused
&&
graph
->
state
!=
State_Paused
)
{
async_filter
=
filter
->
filter
;
hr
=
VFW_S_STATE_INTERMEDIATE
;
}
else
if
(
filter_state
!=
graph
->
state
&&
filter_state
!=
State_Paused
)
hr
=
E_FAIL
;
if
(
filter_state
!=
graph
->
state
)
ERR
(
"Filter %p reported incorrect state %u.
\n
"
,
filter
->
filter
,
filter_state
);
}
...
...
dlls/quartz/tests/filtergraph.c
View file @
9dd5aa17
...
...
@@ -3254,6 +3254,21 @@ static void test_filter_state(void)
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
check_filter_state
(
graph
,
State_Paused
);
sink
.
state
=
State_Stopped
;
hr
=
IMediaControl_GetState
(
control
,
0
,
&
state
);
ok
(
hr
==
E_FAIL
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Paused
,
"Got state %u.
\n
"
,
state
);
sink
.
state
=
State_Running
;
hr
=
IMediaControl_GetState
(
control
,
0
,
&
state
);
ok
(
hr
==
E_FAIL
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Paused
,
"Got state %u.
\n
"
,
state
);
sink
.
state
=
State_Paused
;
hr
=
IMediaControl_GetState
(
control
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Paused
,
"Got state %u.
\n
"
,
state
);
hr
=
IMediaControl_Stop
(
control
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
check_filter_state
(
graph
,
State_Stopped
);
...
...
@@ -3262,10 +3277,40 @@ static void test_filter_state(void)
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
check_filter_state
(
graph
,
State_Running
);
sink
.
state
=
State_Stopped
;
hr
=
IMediaControl_GetState
(
control
,
0
,
&
state
);
ok
(
hr
==
E_FAIL
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Running
,
"Got state %u.
\n
"
,
state
);
sink
.
state
=
State_Paused
;
hr
=
IMediaControl_GetState
(
control
,
0
,
&
state
);
ok
(
hr
==
VFW_S_STATE_INTERMEDIATE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Running
,
"Got state %u.
\n
"
,
state
);
sink
.
state
=
State_Running
;
hr
=
IMediaControl_GetState
(
control
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Running
,
"Got state %u.
\n
"
,
state
);
hr
=
IMediaControl_Stop
(
control
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
check_filter_state
(
graph
,
State_Stopped
);
sink
.
state
=
State_Running
;
hr
=
IMediaControl_GetState
(
control
,
0
,
&
state
);
ok
(
hr
==
E_FAIL
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Stopped
,
"Got state %u.
\n
"
,
state
);
sink
.
state
=
State_Paused
;
hr
=
IMediaControl_GetState
(
control
,
0
,
&
state
);
ok
(
hr
==
VFW_S_STATE_INTERMEDIATE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Stopped
,
"Got state %u.
\n
"
,
state
);
sink
.
state
=
State_Stopped
;
hr
=
IMediaControl_GetState
(
control
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Stopped
,
"Got state %u.
\n
"
,
state
);
hr
=
IMediaControl_Pause
(
control
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
check_filter_state
(
graph
,
State_Paused
);
...
...
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