Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/winegstreamer/media_source.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c index 90efc9aaed2..e153c8e9161 100644 --- a/dlls/winegstreamer/media_source.c +++ b/dlls/winegstreamer/media_source.c @@ -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)
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/winegstreamer/quartz_parser.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c index e12a0c49eb3..5f9535659b4 100644 --- a/dlls/winegstreamer/quartz_parser.c +++ b/dlls/winegstreamer/quartz_parser.c @@ -50,8 +50,6 @@ struct parser unsigned int source_count; BOOL enum_sink_first;
- LONGLONG file_size; - struct wg_parser *wg_parser;
/* FIXME: It would be nice to avoid duplicating these with strmbase. @@ -947,20 +945,20 @@ static HRESULT sink_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE static HRESULT parser_sink_connect(struct strmbase_sink *iface, IPin *peer, const AM_MEDIA_TYPE *pmt) { struct parser *filter = impl_from_strmbase_sink(iface); + LONGLONG file_size, unused; HRESULT hr = S_OK; - LONGLONG unused; unsigned int i;
filter->reader = NULL; if (FAILED(hr = IPin_QueryInterface(peer, &IID_IAsyncReader, (void **)&filter->reader))) return hr;
- IAsyncReader_Length(filter->reader, &filter->file_size, &unused); + IAsyncReader_Length(filter->reader, &file_size, &unused);
filter->sink_connected = true; filter->read_thread = CreateThread(NULL, 0, read_thread, filter, 0, NULL);
- if (FAILED(hr = unix_funcs->wg_parser_connect(filter->wg_parser, filter->file_size))) + if (FAILED(hr = unix_funcs->wg_parser_connect(filter->wg_parser, file_size))) goto err;
if (!filter->init_gst(filter))