Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/dsoundrender.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index fc64eae8f72..f07e7b0d1e0 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -51,7 +51,6 @@ struct dsound_render
struct strmbase_sink sink;
- CRITICAL_SECTION stream_cs; /* Signaled when the filter has completed a state change. The filter waits * for this event in IBaseFilter::GetState(). */ HANDLE state_event; @@ -375,7 +374,7 @@ static HRESULT WINAPI dsound_render_sink_Receive(struct strmbase_sink *iface, IM if (FAILED(hr = DSoundRender_PrepareReceive(filter, sample))) return hr;
- EnterCriticalSection(&filter->stream_cs); + EnterCriticalSection(&filter->filter.stream_cs);
if (filter->filter.clock && SUCCEEDED(IMediaSample_GetTime(sample, &start, &stop))) strmbase_passthrough_update_time(&filter->passthrough, start); @@ -385,7 +384,7 @@ static HRESULT WINAPI dsound_render_sink_Receive(struct strmbase_sink *iface, IM
hr = DSoundRender_DoRenderSample(filter, sample);
- LeaveCriticalSection(&filter->stream_cs); + LeaveCriticalSection(&filter->filter.stream_cs); return hr; }
@@ -515,7 +514,7 @@ static HRESULT dsound_render_sink_eos(struct strmbase_sink *iface) void *buffer; DWORD size;
- EnterCriticalSection(&filter->stream_cs); + EnterCriticalSection(&filter->filter.stream_cs);
filter->eos = TRUE;
@@ -535,7 +534,7 @@ static HRESULT dsound_render_sink_eos(struct strmbase_sink *iface) memset(buffer, 0, size); IDirectSoundBuffer_Unlock(filter->dsbuffer, buffer, size, NULL, 0);
- LeaveCriticalSection(&filter->stream_cs); + LeaveCriticalSection(&filter->filter.stream_cs); return S_OK; }
@@ -551,7 +550,7 @@ static HRESULT dsound_render_sink_end_flush(struct strmbase_sink *iface) { struct dsound_render *filter = impl_from_strmbase_pin(&iface->pin);
- EnterCriticalSection(&filter->stream_cs); + EnterCriticalSection(&filter->filter.stream_cs);
filter->eos = FALSE; strmbase_passthrough_invalidate_time(&filter->passthrough); @@ -569,7 +568,7 @@ static HRESULT dsound_render_sink_end_flush(struct strmbase_sink *iface) filter->writepos = filter->buf_size; }
- LeaveCriticalSection(&filter->stream_cs); + LeaveCriticalSection(&filter->filter.stream_cs); return S_OK; }
@@ -601,9 +600,6 @@ static void dsound_render_destroy(struct strmbase_filter *iface) IPin_Disconnect(&filter->sink.pin.IPin_iface); strmbase_sink_cleanup(&filter->sink);
- filter->stream_cs.DebugInfo->Spare[0] = 0; - DeleteCriticalSection(&filter->stream_cs); - CloseHandle(filter->state_event); CloseHandle(filter->flush_event);
@@ -1095,8 +1091,6 @@ HRESULT dsound_render_create(IUnknown *outer, IUnknown **out)
strmbase_sink_init(&object->sink, &object->filter, L"Audio Input pin (rendered)", &sink_ops, NULL);
- InitializeCriticalSection(&object->stream_cs); - object->stream_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__": dsound_render.stream_cs"); object->state_event = CreateEventW(NULL, TRUE, TRUE, NULL); object->flush_event = CreateEventW(NULL, TRUE, TRUE, NULL);