mfplat: Release queue subscriber on Shutdown.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2021-04-14 09:49:09 +03:00 committed by Alexandre Julliard
parent 3d6669cca3
commit e9a29249b8
1 changed files with 8 additions and 0 deletions

View File

@ -7006,6 +7006,13 @@ static IMFMediaEvent *queue_pop_event(struct event_queue *queue)
return event;
}
static void event_queue_clear_subscriber(struct event_queue *queue)
{
if (queue->subscriber)
IRtwqAsyncResult_Release(queue->subscriber);
queue->subscriber = NULL;
}
static void event_queue_cleanup(struct event_queue *queue)
{
IMFMediaEvent *event;
@ -7258,6 +7265,7 @@ static HRESULT WINAPI eventqueue_Shutdown(IMFMediaEventQueue *iface)
if (!queue->is_shut_down)
{
event_queue_cleanup(queue);
event_queue_clear_subscriber(queue);
queue->is_shut_down = TRUE;
}