Commit c44173dd authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

quartz: Don't hold an extra reference in async_run_cb().

We don't actually need to, because we'll wait for the callback when stopping the graph. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49907Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent c8372153
...@@ -1837,7 +1837,6 @@ static void CALLBACK async_run_cb(TP_CALLBACK_INSTANCE *instance, void *context, ...@@ -1837,7 +1837,6 @@ static void CALLBACK async_run_cb(TP_CALLBACK_INSTANCE *instance, void *context,
} }
LeaveCriticalSection(&graph->cs); LeaveCriticalSection(&graph->cs);
IUnknown_Release(graph->outer_unk);
} }
static HRESULT WINAPI MediaControl_Run(IMediaControl *iface) static HRESULT WINAPI MediaControl_Run(IMediaControl *iface)
...@@ -1897,7 +1896,6 @@ static HRESULT WINAPI MediaControl_Run(IMediaControl *iface) ...@@ -1897,7 +1896,6 @@ static HRESULT WINAPI MediaControl_Run(IMediaControl *iface)
if (!graph->async_run_work) if (!graph->async_run_work)
graph->async_run_work = CreateThreadpoolWork(async_run_cb, graph, NULL); graph->async_run_work = CreateThreadpoolWork(async_run_cb, graph, NULL);
graph->needs_async_run = 1; graph->needs_async_run = 1;
IUnknown_AddRef(graph->outer_unk);
SubmitThreadpoolWork(graph->async_run_work); SubmitThreadpoolWork(graph->async_run_work);
} }
else else
...@@ -5008,9 +5006,8 @@ static HRESULT WINAPI MediaFilter_Stop(IMediaFilter *iface) ...@@ -5008,9 +5006,8 @@ static HRESULT WINAPI MediaFilter_Stop(IMediaFilter *iface)
LeaveCriticalSection(&graph->cs); LeaveCriticalSection(&graph->cs);
/* Don't cancel the callback; it's holding a reference to the graph. */
if (work) if (work)
WaitForThreadpoolWorkCallbacks(work, FALSE); WaitForThreadpoolWorkCallbacks(work, TRUE);
return hr; return hr;
} }
...@@ -5059,9 +5056,8 @@ static HRESULT WINAPI MediaFilter_Pause(IMediaFilter *iface) ...@@ -5059,9 +5056,8 @@ static HRESULT WINAPI MediaFilter_Pause(IMediaFilter *iface)
LeaveCriticalSection(&graph->cs); LeaveCriticalSection(&graph->cs);
/* Don't cancel the callback; it's holding a reference to the graph. */
if (work) if (work)
WaitForThreadpoolWorkCallbacks(work, FALSE); WaitForThreadpoolWorkCallbacks(work, TRUE);
return hr; return hr;
} }
......
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