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@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7f1623bc62
)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
parent
08a3472c54
commit
2a51b72ec3
|
@ -5095,7 +5095,6 @@ static HRESULT WINAPI MediaFilter_GetState(IMediaFilter *iface, DWORD timeout, F
|
||||||
{
|
{
|
||||||
struct filter_graph *graph = impl_from_IMediaFilter(iface);
|
struct filter_graph *graph = impl_from_IMediaFilter(iface);
|
||||||
DWORD end = GetTickCount() + timeout;
|
DWORD end = GetTickCount() + timeout;
|
||||||
FILTER_STATE expect_state;
|
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
TRACE("graph %p, timeout %u, state %p.\n", graph, timeout, state);
|
TRACE("graph %p, timeout %u, state %p.\n", graph, timeout, state);
|
||||||
|
@ -5111,7 +5110,6 @@ static HRESULT WINAPI MediaFilter_GetState(IMediaFilter *iface, DWORD timeout, F
|
||||||
|
|
||||||
EnterCriticalSection(&graph->cs);
|
EnterCriticalSection(&graph->cs);
|
||||||
*state = graph->state;
|
*state = graph->state;
|
||||||
expect_state = graph->needs_async_run ? State_Paused : graph->state;
|
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
@ -5143,9 +5141,18 @@ static HRESULT WINAPI MediaFilter_GetState(IMediaFilter *iface, DWORD timeout, F
|
||||||
else if (filter_state != graph->state && filter_state != State_Paused)
|
else if (filter_state != graph->state && filter_state != State_Paused)
|
||||||
hr = E_FAIL;
|
hr = E_FAIL;
|
||||||
|
|
||||||
if (filter_state != expect_state)
|
if (graph->needs_async_run)
|
||||||
ERR("Filter %p reported incorrect state %u (expected %u).\n",
|
{
|
||||||
filter->filter, filter_state, expect_state);
|
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);
|
LeaveCriticalSection(&graph->cs);
|
||||||
|
|
Loading…
Reference in New Issue