Commit 31aa91c9 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winegstreamer: Avoid leaking async ops on release or multiple close.

parent e5bf17d9
......@@ -267,12 +267,20 @@ static HRESULT open_stream(struct async_reader *reader, IWMReaderCallback *callb
static void close_stream(struct async_reader *reader)
{
struct async_op *op, *next;
if (reader->callback_thread)
{
WaitForSingleObject(reader->callback_thread, INFINITE);
CloseHandle(reader->callback_thread);
reader->callback_thread = NULL;
}
LIST_FOR_EACH_ENTRY_SAFE(op, next, &reader->async_ops, struct async_op, entry)
{
list_remove(&op->entry);
free(op);
}
}
static HRESULT async_reader_queue_op(struct async_reader *reader, enum async_op_type type, void *context)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment