strmbase: Acquire the streaming lock in MemInputPin_Receive().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
89b82195cd
commit
32d339829e
|
@ -373,18 +373,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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue