Zebediah Figura : quartz: Do not print an incorrect state warning in MediaFilter_GetState() if a filter has been run asynchronously.
Alexandre Julliard
julliard at winehq.org
Tue Jun 29 15:58:27 CDT 2021
Module: wine
Branch: master
Commit: 7f1623bc626d3ca2411c1a3088512d8ef461252b
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7f1623bc626d3ca2411c1a3088512d8ef461252b
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Tue Jun 29 15:00:15 2021 -0500
quartz: Do not print an incorrect state warning in MediaFilter_GetState() if a filter has been run asynchronously.
This is a valid case in which the filter state may or may not match the graph
state.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/quartz/filtergraph.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
index 4861d6cf1b0..a1f3757a202 100644
--- a/dlls/quartz/filtergraph.c
+++ b/dlls/quartz/filtergraph.c
@@ -5106,7 +5106,6 @@ static HRESULT WINAPI MediaFilter_GetState(IMediaFilter *iface, DWORD timeout, F
{
struct filter_graph *graph = impl_from_IMediaFilter(iface);
DWORD end = GetTickCount() + timeout;
- FILTER_STATE expect_state;
HRESULT hr;
TRACE("graph %p, timeout %u, state %p.\n", graph, timeout, state);
@@ -5122,7 +5121,6 @@ static HRESULT WINAPI MediaFilter_GetState(IMediaFilter *iface, DWORD timeout, F
EnterCriticalSection(&graph->cs);
*state = graph->state;
- expect_state = graph->needs_async_run ? State_Paused : graph->state;
for (;;)
{
@@ -5154,9 +5152,18 @@ static HRESULT WINAPI MediaFilter_GetState(IMediaFilter *iface, DWORD timeout, F
else if (filter_state != graph->state && filter_state != State_Paused)
hr = E_FAIL;
- if (filter_state != expect_state)
- ERR("Filter %p reported incorrect state %u (expected %u).\n",
- filter->filter, filter_state, expect_state);
+ if (graph->needs_async_run)
+ {
+ if (filter_state != State_Paused && filter_state != State_Running)
+ ERR("Filter %p reported incorrect state %u (expected %u or %u).\n",
+ filter->filter, filter_state, State_Paused, State_Running);
+ }
+ else
+ {
+ if (filter_state != graph->state)
+ ERR("Filter %p reported incorrect state %u (expected %u).\n",
+ filter->filter, filter_state, graph->state);
+ }
}
LeaveCriticalSection(&graph->cs);
More information about the wine-cvs
mailing list