Rémi Bernon : mfplat: Read queue subscriber within the critical section.

Alexandre Julliard julliard at winehq.org
Mon Apr 12 16:11:26 CDT 2021


Module: wine
Branch: master
Commit: 4904d90870a716fda971fc12240ddbc23323475c
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=4904d90870a716fda971fc12240ddbc23323475c

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Mon Apr 12 18:36:02 2021 +0200

mfplat: Read queue subscriber within the critical section.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mfplat/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c
index 6fb8661dba4..9078702c854 100644
--- a/dlls/mfplat/main.c
+++ b/dlls/mfplat/main.c
@@ -7109,7 +7109,7 @@ static void queue_notify_subscriber(struct event_queue *queue)
 static HRESULT WINAPI eventqueue_BeginGetEvent(IMFMediaEventQueue *iface, IMFAsyncCallback *callback, IUnknown *state)
 {
     struct event_queue *queue = impl_from_IMFMediaEventQueue(iface);
-    MFASYNCRESULT *result_data = (MFASYNCRESULT *)queue->subscriber;
+    MFASYNCRESULT *result_data;
     HRESULT hr;
 
     TRACE("%p, %p, %p.\n", iface, callback, state);
@@ -7121,7 +7121,7 @@ static HRESULT WINAPI eventqueue_BeginGetEvent(IMFMediaEventQueue *iface, IMFAsy
 
     if (queue->is_shut_down)
         hr = MF_E_SHUTDOWN;
-    else if (result_data)
+    else if ((result_data = (MFASYNCRESULT *)queue->subscriber))
     {
         if (result_data->pCallback == callback)
             hr = IRtwqAsyncResult_GetStateNoAddRef(queue->subscriber) == state ?




More information about the wine-cvs mailing list