Nikolay Sivov : mfplat: Make sure async event delivery is triggered with EndGetEvent().
Module: wine Branch: master Commit: 67bd377af2389ecc1473f01c702a3fd264b8cf0f URL: https://source.winehq.org/git/wine.git/?a=commit;h=67bd377af2389ecc1473f01c7... Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jun 7 16:09:01 2019 +0300 mfplat: Make sure async event delivery is triggered with EndGetEvent(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfplat/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c index 460f21e..224ba6e 100644 --- a/dlls/mfplat/main.c +++ b/dlls/mfplat/main.c @@ -5982,6 +5982,7 @@ struct event_queue CONDITION_VARIABLE update_event; struct list events; BOOL is_shut_down; + BOOL notified; IMFAsyncResult *subscriber; }; @@ -6105,9 +6106,10 @@ static HRESULT WINAPI eventqueue_GetEvent(IMFMediaEventQueue *iface, DWORD flags static void queue_notify_subscriber(struct event_queue *queue) { - if (list_empty(&queue->events) || !queue->subscriber) + if (list_empty(&queue->events) || !queue->subscriber || queue->notified) return; + queue->notified = TRUE; MFPutWorkItemEx(MFASYNC_CALLBACK_QUEUE_STANDARD, queue->subscriber); } @@ -6163,6 +6165,7 @@ static HRESULT WINAPI eventqueue_EndGetEvent(IMFMediaEventQueue *iface, IMFAsync if (queue->subscriber) IMFAsyncResult_Release(queue->subscriber); queue->subscriber = NULL; + queue->notified = FALSE; hr = *event ? S_OK : E_FAIL; }
participants (1)
-
Alexandre Julliard