Commit 2e265566 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

winegstreamer: Shut down the read thread before releasing the IMFByteStream.

parent a891713f
......@@ -1211,6 +1211,13 @@ static HRESULT WINAPI media_source_Shutdown(IMFMediaSource *iface)
unix_funcs->wg_parser_disconnect(source->wg_parser);
if (source->read_thread)
{
source->read_thread_shutdown = true;
WaitForSingleObject(source->read_thread, INFINITE);
CloseHandle(source->read_thread);
}
if (source->pres_desc)
IMFPresentationDescriptor_Release(source->pres_desc);
if (source->event_queue)
......@@ -1234,13 +1241,6 @@ static HRESULT WINAPI media_source_Shutdown(IMFMediaSource *iface)
IMFMediaStream_Release(&stream->IMFMediaStream_iface);
}
if (source->read_thread)
{
source->read_thread_shutdown = true;
WaitForSingleObject(source->read_thread, INFINITE);
CloseHandle(source->read_thread);
}
unix_funcs->wg_parser_destroy(source->wg_parser);
if (source->stream_count)
......
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