Commit 5069c2ad authored by Davide Beatrici's avatar Davide Beatrici Committed by Alexandre Julliard

winecoreaudio: Refactor AudioClient's Release to match other drivers.

parent 0f41f29a
......@@ -402,17 +402,17 @@ static ULONG WINAPI AudioClient_Release(IAudioClient3 *iface)
ref = InterlockedDecrement(&This->ref);
TRACE("(%p) Refcount now %lu\n", This, ref);
if(!ref){
if(This->stream){
stream_release(This->stream, This->timer_thread);
This->stream = 0;
IAudioClient3_Stop(iface);
IMMDevice_Release(This->parent);
IUnknown_Release(This->marshal);
if(This->session){
sessions_lock();
list_remove(&This->entry);
sessions_unlock();
}
free(This->vols);
IMMDevice_Release(This->parent);
IUnknown_Release(This->marshal);
if(This->stream)
stream_release(This->stream, This->timer_thread);
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
......
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