Commit f27030f1 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

quartz/acmwrapper: Use the strmbase_passthrough object directly.

parent dd3fe639
......@@ -43,7 +43,7 @@ typedef struct ACMWrapperImpl
struct strmbase_source source;
IQualityControl source_IQualityControl_iface;
IQualityControl *source_qc_sink;
IUnknown *seeking;
struct strmbase_passthrough passthrough;
struct strmbase_sink sink;
......@@ -337,7 +337,7 @@ static HRESULT acm_wrapper_source_query_interface(struct strmbase_pin *iface, RE
if (IsEqualGUID(iid, &IID_IQualityControl))
*out = &filter->source_IQualityControl_iface;
else if (IsEqualGUID(iid, &IID_IMediaSeeking))
return IUnknown_QueryInterface(filter->seeking, iid, out);
*out = &filter->passthrough.IMediaSeeking_iface;
else
return E_NOINTERFACE;
......@@ -486,11 +486,11 @@ static void acm_wrapper_destroy(struct strmbase_filter *iface)
strmbase_sink_cleanup(&filter->sink);
strmbase_source_cleanup(&filter->source);
strmbase_passthrough_cleanup(&filter->passthrough);
filter->stream_cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&filter->stream_cs);
FreeMediaType(&filter->mt);
IUnknown_Release(filter->seeking);
strmbase_filter_cleanup(&filter->filter);
free(filter);
......@@ -523,9 +523,7 @@ static const struct strmbase_filter_ops filter_ops =
HRESULT acm_wrapper_create(IUnknown *outer, IUnknown **out)
{
ISeekingPassThru *passthrough;
ACMWrapperImpl *object;
HRESULT hr;
if (!(object = calloc(1, sizeof(*object))))
return E_OUTOFMEMORY;
......@@ -539,21 +537,9 @@ HRESULT acm_wrapper_create(IUnknown *outer, IUnknown **out)
strmbase_source_init(&object->source, &object->filter, L"Out", &source_ops);
object->source_IQualityControl_iface.lpVtbl = &source_qc_vtbl;
if (FAILED(hr = CoCreateInstance(&CLSID_SeekingPassThru,
(IUnknown *)&object->source.pin.IPin_iface, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void **)&object->seeking)))
{
strmbase_sink_cleanup(&object->sink);
strmbase_source_cleanup(&object->source);
strmbase_filter_cleanup(&object->filter);
free(object);
return hr;
}
IUnknown_QueryInterface(object->seeking, &IID_ISeekingPassThru, (void **)&passthrough);
ISeekingPassThru_Init(passthrough, FALSE, &object->sink.pin.IPin_iface);
ISeekingPassThru_Release(passthrough);
strmbase_passthrough_init(&object->passthrough, (IUnknown *)&object->source.pin.IPin_iface);
ISeekingPassThru_Init(&object->passthrough.ISeekingPassThru_iface, FALSE,
&object->sink.pin.IPin_iface);
object->lasttime_real = object->lasttime_sent = -1;
......
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