From: Connor McAdams cmcadams@codeweavers.com
Signed-off-by: Connor McAdams cmcadams@codeweavers.com --- dlls/quartz/filtergraph.c | 10 ++-------- dlls/quartz/tests/filtergraph.c | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 987821f3fb1..fd5ec5bf348 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -134,7 +134,6 @@ struct filter_graph int HandleEcComplete; int HandleEcRepaint; int HandleEcClockChanged; - unsigned int got_ec_complete : 1; unsigned int media_events_disabled : 1;
CRITICAL_SECTION cs; @@ -2378,11 +2377,7 @@ static HRESULT WINAPI MediaSeeking_GetCurrentPosition(IMediaSeeking *iface, LONG
EnterCriticalSection(&graph->cs);
- if (graph->got_ec_complete) - { - ret = graph->stream_stop; - } - else if (graph->state == State_Running && !graph->needs_async_run && graph->refClock) + if (graph->state == State_Running && !graph->needs_async_run && graph->refClock) { REFERENCE_TIME time; IReferenceClock_GetTime(graph->refClock, &time); @@ -5100,7 +5095,6 @@ static HRESULT WINAPI MediaFilter_Stop(IMediaFilter *iface) graph->state = State_Stopped; graph->needs_async_run = 0; work = graph->async_run_work; - graph->got_ec_complete = 0;
/* Update the current position, probably to synchronize multiple streams. */ IMediaSeeking_SetPositions(&graph->IMediaSeeking_iface, &graph->current_pos, @@ -5399,7 +5393,7 @@ static HRESULT WINAPI MediaEventSink_Notify(IMediaEventSink *iface, LONG code, else queue_media_event(graph, EC_COMPLETE, S_OK, 0); graph->CompletionStatus = EC_COMPLETE; - graph->got_ec_complete = 1; + graph->current_pos = graph->stream_stop; SetEvent(graph->hEventCompletion); } } diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index ebd1695617c..df1f02cfd00 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -546,7 +546,7 @@ static void test_media_event(IFilterGraph2 *graph)
hr = IMediaSeeking_GetCurrentPosition(seeking, ¤t); ok(hr == S_OK, "Got hr %#lx.\n", hr); - todo_wine ok(current != stop, "Got current position %s.\n", wine_dbgstr_longlong(current)); + ok(current != stop, "Got current position %s.\n", wine_dbgstr_longlong(current));
hr = IMediaControl_Stop(control); ok(SUCCEEDED(hr), "Got hr %#lx.\n", hr);