Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/dsoundrender.c | 7 +------ dlls/strmbase/pin.c | 4 ++++ dlls/strmbase/renderer.c | 5 ----- 3 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index f07e7b0d1e0..7e08d90569e 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -374,18 +374,13 @@ static HRESULT WINAPI dsound_render_sink_Receive(struct strmbase_sink *iface, IM if (FAILED(hr = DSoundRender_PrepareReceive(filter, sample))) return hr;
- EnterCriticalSection(&filter->filter.stream_cs); - if (filter->filter.clock && SUCCEEDED(IMediaSample_GetTime(sample, &start, &stop))) strmbase_passthrough_update_time(&filter->passthrough, start);
if (filter->filter.state == State_Paused) SetEvent(filter->state_event);
- hr = DSoundRender_DoRenderSample(filter, sample); - - LeaveCriticalSection(&filter->filter.stream_cs); - return hr; + return DSoundRender_DoRenderSample(filter, sample); }
static HRESULT dsound_render_sink_query_interface(struct strmbase_pin *iface, REFIID iid, void **out) diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c index dcfbdcd767e..54f8662e7ff 100644 --- a/dlls/strmbase/pin.c +++ b/dlls/strmbase/pin.c @@ -1140,7 +1140,11 @@ static HRESULT WINAPI MemInputPin_Receive(IMemInputPin *iface, IMediaSample *sam debugstr_w(pin->pin.name), sample);
if (pin->pFuncsTable->pfnReceive) + { + EnterCriticalSection(&pin->pin.filter->stream_cs); hr = pin->pFuncsTable->pfnReceive(pin, sample); + LeaveCriticalSection(&pin->pin.filter->stream_cs); + } return hr; }
diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index b63129e0e87..b890ab72bf6 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -192,8 +192,6 @@ static HRESULT WINAPI BaseRenderer_Receive(struct strmbase_sink *pin, IMediaSamp DeleteMediaType(mt); }
- EnterCriticalSection(&filter->filter.stream_cs); - if (filter->filter.clock && SUCCEEDED(IMediaSample_GetTime(sample, &start, &stop))) { strmbase_passthrough_update_time(&filter->passthrough, start); @@ -229,7 +227,6 @@ static HRESULT WINAPI BaseRenderer_Receive(struct strmbase_sink *pin, IMediaSamp
if (ret == 1) { - LeaveCriticalSection(&filter->filter.stream_cs); TRACE("Flush signaled; discarding current sample.\n"); return S_OK; } @@ -245,8 +242,6 @@ static HRESULT WINAPI BaseRenderer_Receive(struct strmbase_sink *pin, IMediaSamp
QualityControlRender_DoQOS(&filter->qc);
- LeaveCriticalSection(&filter->filter.stream_cs); - return hr; }