[PATCH v2 6/7] quartz: Reset the event if the queue was empty in IMediaEvent::GetEvent().
Zebediah Figura
z.figura12 at gmail.com
Thu Feb 18 16:58:13 CST 2021
From: Anton Baskanov <baskanov at gmail.com>
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
dlls/quartz/filtergraph.c | 4 +---
dlls/quartz/tests/filtergraph.c | 4 ++--
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
index 8909ba64024..131e022b0ba 100644
--- a/dlls/quartz/filtergraph.c
+++ b/dlls/quartz/filtergraph.c
@@ -4744,6 +4744,7 @@ static HRESULT WINAPI MediaEvent_GetEvent(IMediaEventEx *iface, LONG *code,
if (!(entry = list_head(&graph->media_events)))
{
+ ResetEvent(graph->media_event_handle);
LeaveCriticalSection(&graph->cs);
return E_ABORT;
}
@@ -4754,9 +4755,6 @@ static HRESULT WINAPI MediaEvent_GetEvent(IMediaEventEx *iface, LONG *code,
*param2 = event->param2;
free(event);
- if (list_empty(&graph->media_events))
- ResetEvent(graph->media_event_handle);
-
LeaveCriticalSection(&graph->cs);
return S_OK;
}
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c
index 5d22ba410af..81b13255382 100644
--- a/dlls/quartz/tests/filtergraph.c
+++ b/dlls/quartz/tests/filtergraph.c
@@ -5260,7 +5260,7 @@ static void test_set_notify_flags(void)
hr = IMediaEventEx_GetEvent(media_event, &code, ¶m1, ¶m2, 50);
ok(hr == E_ABORT, "Got hr %#x.\n", hr);
- todo_wine ok(WaitForSingleObject(event, 0) == WAIT_TIMEOUT, "Event should not be signaled.\n");
+ ok(WaitForSingleObject(event, 0) == WAIT_TIMEOUT, "Event should not be signaled.\n");
hr = IMediaEventEx_SetNotifyFlags(media_event, 0);
ok(hr == S_OK, "Got hr %#x.\n", hr);
@@ -5474,7 +5474,7 @@ static void test_events(void)
hr = IMediaEventEx_GetEvent(media_event, &code, ¶m1, ¶m2, 50);
ok(hr == E_ABORT, "Got hr %#x.\n", hr);
- todo_wine ok(WaitForSingleObject(event, 0) == WAIT_TIMEOUT, "Event should not be signaled.\n");
+ ok(WaitForSingleObject(event, 0) == WAIT_TIMEOUT, "Event should not be signaled.\n");
hr = IMediaControl_Stop(media_control);
ok(hr == S_OK, "Got hr %#x.\n", hr);
--
2.30.1
More information about the wine-devel
mailing list