quartz/acmwrapper: Use the strmbase stream lock.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
480ece6a15
commit
53d8a28a43
|
@ -38,7 +38,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz);
|
||||||
struct acm_wrapper
|
struct acm_wrapper
|
||||||
{
|
{
|
||||||
struct strmbase_filter filter;
|
struct strmbase_filter filter;
|
||||||
CRITICAL_SECTION stream_cs;
|
|
||||||
|
|
||||||
struct strmbase_source source;
|
struct strmbase_source source;
|
||||||
IQualityControl source_IQualityControl_iface;
|
IQualityControl source_IQualityControl_iface;
|
||||||
|
@ -108,13 +107,10 @@ static HRESULT WINAPI acm_wrapper_sink_Receive(struct strmbase_sink *iface, IMed
|
||||||
if (This->sink.flushing)
|
if (This->sink.flushing)
|
||||||
return S_FALSE;
|
return S_FALSE;
|
||||||
|
|
||||||
EnterCriticalSection(&This->stream_cs);
|
|
||||||
|
|
||||||
hr = IMediaSample_GetPointer(pSample, &pbSrcStream);
|
hr = IMediaSample_GetPointer(pSample, &pbSrcStream);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
ERR("Cannot get pointer to sample data (%x)\n", hr);
|
ERR("Cannot get pointer to sample data (%x)\n", hr);
|
||||||
LeaveCriticalSection(&This->stream_cs);
|
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,7 +146,6 @@ static HRESULT WINAPI acm_wrapper_sink_Receive(struct strmbase_sink *iface, IMed
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
ERR("Unable to get delivery buffer (%x)\n", hr);
|
ERR("Unable to get delivery buffer (%x)\n", hr);
|
||||||
LeaveCriticalSection(&This->stream_cs);
|
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
IMediaSample_SetPreroll(pOutSample, preroll);
|
IMediaSample_SetPreroll(pOutSample, preroll);
|
||||||
|
@ -267,7 +262,6 @@ error:
|
||||||
This->lasttime_real = tStop;
|
This->lasttime_real = tStop;
|
||||||
This->lasttime_sent = tMed;
|
This->lasttime_sent = tMed;
|
||||||
|
|
||||||
LeaveCriticalSection(&This->stream_cs);
|
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -487,8 +481,6 @@ static void acm_wrapper_destroy(struct strmbase_filter *iface)
|
||||||
strmbase_source_cleanup(&filter->source);
|
strmbase_source_cleanup(&filter->source);
|
||||||
strmbase_passthrough_cleanup(&filter->passthrough);
|
strmbase_passthrough_cleanup(&filter->passthrough);
|
||||||
|
|
||||||
filter->stream_cs.DebugInfo->Spare[0] = 0;
|
|
||||||
DeleteCriticalSection(&filter->stream_cs);
|
|
||||||
FreeMediaType(&filter->mt);
|
FreeMediaType(&filter->mt);
|
||||||
strmbase_filter_cleanup(&filter->filter);
|
strmbase_filter_cleanup(&filter->filter);
|
||||||
free(filter);
|
free(filter);
|
||||||
|
@ -532,9 +524,6 @@ HRESULT acm_wrapper_create(IUnknown *outer, IUnknown **out)
|
||||||
|
|
||||||
strmbase_filter_init(&object->filter, outer, &CLSID_ACMWrapper, &filter_ops);
|
strmbase_filter_init(&object->filter, outer, &CLSID_ACMWrapper, &filter_ops);
|
||||||
|
|
||||||
InitializeCriticalSection(&object->stream_cs);
|
|
||||||
object->stream_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__": acm_wrapper.stream_cs");
|
|
||||||
|
|
||||||
strmbase_sink_init(&object->sink, &object->filter, L"In", &sink_ops, NULL);
|
strmbase_sink_init(&object->sink, &object->filter, L"In", &sink_ops, NULL);
|
||||||
|
|
||||||
strmbase_source_init(&object->source, &object->filter, L"Out", &source_ops);
|
strmbase_source_init(&object->source, &object->filter, L"Out", &source_ops);
|
||||||
|
|
Loading…
Reference in New Issue