Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qcap/audiorecord.c | 2 +- dlls/qcap/avico.c | 6 +++--- dlls/qcap/avimux.c | 6 +++--- dlls/qcap/smartteefilter.c | 8 ++++---- dlls/qcap/vfwcapture.c | 4 ++-- dlls/qedit/samplegrabber.c | 6 +++--- dlls/quartz/filesource.c | 4 ++-- dlls/quartz/tests/videorenderer.c | 4 ++-- dlls/quartz/tests/vmr7.c | 4 ++-- dlls/quartz/tests/vmr9.c | 4 ++-- dlls/strmbase/enumpins.c | 10 ++++------ dlls/strmbase/filter.c | 14 +++----------- dlls/strmbase/renderer.c | 4 ++-- dlls/strmbase/transform.c | 6 +++--- dlls/winegstreamer/gstdemux.c | 6 +++--- dlls/wineqtdecoder/qtsplitter.c | 10 +++++----- include/wine/strmbase.h | 2 +- 17 files changed, 45 insertions(+), 55 deletions(-)
diff --git a/dlls/qcap/audiorecord.c b/dlls/qcap/audiorecord.c index 6446ee6b4e..0262bc5bd8 100644 --- a/dlls/qcap/audiorecord.c +++ b/dlls/qcap/audiorecord.c @@ -67,7 +67,7 @@ static const IBaseFilterVtbl AudioRecordVtbl = { BaseFilterImpl_QueryVendorInfo };
-static IPin *audio_record_get_pin(struct strmbase_filter *iface, unsigned int index) +static struct strmbase_pin *audio_record_get_pin(struct strmbase_filter *iface, unsigned int index) { FIXME("iface %p, index %u, stub!\n", iface, index); return NULL; diff --git a/dlls/qcap/avico.c b/dlls/qcap/avico.c index 1cbeb70f03..2e81a6b0c4 100644 --- a/dlls/qcap/avico.c +++ b/dlls/qcap/avico.c @@ -178,14 +178,14 @@ static const IBaseFilterVtbl AVICompressorVtbl = { BaseFilterImpl_QueryVendorInfo, };
-static IPin *avi_compressor_get_pin(struct strmbase_filter *iface, unsigned int index) +static struct strmbase_pin *avi_compressor_get_pin(struct strmbase_filter *iface, unsigned int index) { AVICompressor *filter = impl_from_strmbase_filter(iface);
if (index == 0) - return &filter->sink.pin.IPin_iface; + return &filter->sink.pin; else if (index == 1) - return &filter->source.pin.IPin_iface; + return &filter->source.pin; return NULL; }
diff --git a/dlls/qcap/avimux.c b/dlls/qcap/avimux.c index 51a1a503af..1995358ac2 100644 --- a/dlls/qcap/avimux.c +++ b/dlls/qcap/avimux.c @@ -113,14 +113,14 @@ static inline AviMux* impl_from_strmbase_filter(struct strmbase_filter *filter) return CONTAINING_RECORD(filter, AviMux, filter); }
-static IPin *avi_mux_get_pin(struct strmbase_filter *iface, unsigned int index) +static struct strmbase_pin *avi_mux_get_pin(struct strmbase_filter *iface, unsigned int index) { AviMux *filter = impl_from_strmbase_filter(iface);
if (!index) - return &filter->source.pin.IPin_iface; + return &filter->source.pin; else if (index <= filter->input_pin_no) - return &filter->in[index - 1]->pin.pin.IPin_iface; + return &filter->in[index - 1]->pin.pin; return NULL; }
diff --git a/dlls/qcap/smartteefilter.c b/dlls/qcap/smartteefilter.c index e3740bed13..fd0dd621e3 100644 --- a/dlls/qcap/smartteefilter.c +++ b/dlls/qcap/smartteefilter.c @@ -69,16 +69,16 @@ static const IBaseFilterVtbl SmartTeeFilterVtbl = { BaseFilterImpl_QueryVendorInfo };
-static IPin *smart_tee_get_pin(struct strmbase_filter *iface, unsigned int index) +static struct strmbase_pin *smart_tee_get_pin(struct strmbase_filter *iface, unsigned int index) { SmartTeeFilter *filter = impl_from_strmbase_filter(iface);
if (index == 0) - return &filter->sink.pin.IPin_iface; + return &filter->sink.pin; else if (index == 1) - return &filter->capture.pin.IPin_iface; + return &filter->capture.pin; else if (index == 2) - return &filter->preview.pin.IPin_iface; + return &filter->preview.pin; return NULL; }
diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c index 0be0914836..883aade2dc 100644 --- a/dlls/qcap/vfwcapture.c +++ b/dlls/qcap/vfwcapture.c @@ -82,14 +82,14 @@ static inline VfwCapture *impl_from_IPersistPropertyBag(IPersistPropertyBag *ifa return CONTAINING_RECORD(iface, VfwCapture, IPersistPropertyBag_iface); }
-static IPin *vfw_capture_get_pin(struct strmbase_filter *iface, unsigned int index) +static struct strmbase_pin *vfw_capture_get_pin(struct strmbase_filter *iface, unsigned int index) { VfwCapture *This = impl_from_strmbase_filter(iface);
if (index >= 1) return NULL;
- return &This->source.pin.IPin_iface; + return &This->source.pin; }
static void vfw_capture_destroy(struct strmbase_filter *iface) diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c index 59238f5896..9dd8c02b23 100644 --- a/dlls/qedit/samplegrabber.c +++ b/dlls/qedit/samplegrabber.c @@ -100,14 +100,14 @@ static void SampleGrabber_cleanup(SG_Impl *This) IUnknown_Release(This->seekthru_unk); }
-static IPin *sample_grabber_get_pin(struct strmbase_filter *iface, unsigned int index) +static struct strmbase_pin *sample_grabber_get_pin(struct strmbase_filter *iface, unsigned int index) { SG_Impl *filter = impl_from_strmbase_filter(iface);
if (index == 0) - return &filter->sink.pin.IPin_iface; + return &filter->sink.pin; else if (index == 1) - return &filter->source.pin.IPin_iface; + return &filter->source.pin; return NULL; }
diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index 59f1cc5a18..1c17980f58 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -341,12 +341,12 @@ BOOL get_media_type(const WCHAR *filename, GUID *majortype, GUID *subtype, GUID return FALSE; }
-static IPin *async_reader_get_pin(struct strmbase_filter *iface, unsigned int index) +static struct strmbase_pin *async_reader_get_pin(struct strmbase_filter *iface, unsigned int index) { AsyncReader *filter = impl_from_strmbase_filter(iface);
if (!index && filter->pszFileName) - return &filter->source.pin.IPin_iface; + return &filter->source.pin; return NULL; }
diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index 046d94b0b8..8ff7917a7b 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -519,11 +519,11 @@ static inline struct testfilter *impl_from_BaseFilter(struct strmbase_filter *if return CONTAINING_RECORD(iface, struct testfilter, filter); }
-static IPin *testfilter_get_pin(struct strmbase_filter *iface, unsigned int index) +static struct strmbase_pin *testfilter_get_pin(struct strmbase_filter *iface, unsigned int index) { struct testfilter *filter = impl_from_BaseFilter(iface); if (!index) - return &filter->source.pin.IPin_iface; + return &filter->source.pin; return NULL; }
diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index 568d74a26a..01d9ad10fa 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -879,11 +879,11 @@ static inline struct testfilter *impl_from_strmbase_filter(struct strmbase_filte return CONTAINING_RECORD(iface, struct testfilter, filter); }
-static IPin *testfilter_get_pin(struct strmbase_filter *iface, unsigned int index) +static struct strmbase_pin *testfilter_get_pin(struct strmbase_filter *iface, unsigned int index) { struct testfilter *filter = impl_from_strmbase_filter(iface); if (!index) - return &filter->source.pin.IPin_iface; + return &filter->source.pin; return NULL; }
diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index c5a455afb2..9379fa11e4 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -883,11 +883,11 @@ static inline struct testfilter *impl_from_strmbase_filter(struct strmbase_filte return CONTAINING_RECORD(iface, struct testfilter, filter); }
-static IPin *testfilter_get_pin(struct strmbase_filter *iface, unsigned int index) +static struct strmbase_pin *testfilter_get_pin(struct strmbase_filter *iface, unsigned int index) { struct testfilter *filter = impl_from_strmbase_filter(iface); if (!index) - return &filter->source.pin.IPin_iface; + return &filter->source.pin; return NULL; }
diff --git a/dlls/strmbase/enumpins.c b/dlls/strmbase/enumpins.c index 5175158e96..1cfea85b0c 100644 --- a/dlls/strmbase/enumpins.c +++ b/dlls/strmbase/enumpins.c @@ -42,7 +42,6 @@ static const struct IEnumPinsVtbl IEnumPinsImpl_Vtbl; HRESULT enum_pins_create(struct strmbase_filter *base, IEnumPins **out) { IEnumPinsImpl *object; - IPin *pin;
if (!out) return E_POINTER; @@ -59,7 +58,7 @@ HRESULT enum_pins_create(struct strmbase_filter *base, IEnumPins **out) IBaseFilter_AddRef(&base->IBaseFilter_iface); object->Version = base->pin_version;
- while ((pin = base->ops->filter_get_pin(base, object->count))) + while (base->ops->filter_get_pin(base, object->count)) ++object->count;
TRACE("Created enumerator %p.\n", object); @@ -137,12 +136,12 @@ static HRESULT WINAPI IEnumPinsImpl_Next(IEnumPins * iface, ULONG cPins, IPin **
for (i = 0; i < cPins; ++i) { - IPin *pin = This->base->ops->filter_get_pin(This->base, This->uIndex + i); + struct strmbase_pin *pin = This->base->ops->filter_get_pin(This->base, This->uIndex + i);
if (!pin) break;
- IPin_AddRef(ppPins[i] = pin); + IPin_AddRef(ppPins[i] = &pin->IPin_iface); }
if (pcFetched) @@ -173,14 +172,13 @@ static HRESULT WINAPI IEnumPinsImpl_Skip(IEnumPins *iface, ULONG count) static HRESULT WINAPI IEnumPinsImpl_Reset(IEnumPins *iface) { IEnumPinsImpl *enum_pins = impl_from_IEnumPins(iface); - IPin *pin;
TRACE("iface %p.\n", iface);
if (enum_pins->Version != enum_pins->base->pin_version) { enum_pins->count = 0; - while ((pin = enum_pins->base->ops->filter_get_pin(enum_pins->base, enum_pins->count))) + while (enum_pins->base->ops->filter_get_pin(enum_pins->base, enum_pins->count)) ++enum_pins->count; }
diff --git a/dlls/strmbase/filter.c b/dlls/strmbase/filter.c index ffe506d517..60e3823322 100644 --- a/dlls/strmbase/filter.c +++ b/dlls/strmbase/filter.c @@ -250,24 +250,16 @@ HRESULT WINAPI BaseFilterImpl_EnumPins(IBaseFilter *iface, IEnumPins **enum_pins HRESULT WINAPI BaseFilterImpl_FindPin(IBaseFilter *iface, const WCHAR *id, IPin **ret) { struct strmbase_filter *This = impl_from_IBaseFilter(iface); + struct strmbase_pin *pin; unsigned int i; - PIN_INFO info; - HRESULT hr; - IPin *pin;
TRACE("(%p)->(%s, %p)\n", This, debugstr_w(id), ret);
for (i = 0; (pin = This->ops->filter_get_pin(This, i)); ++i) { - hr = IPin_QueryPinInfo(pin, &info); - if (FAILED(hr)) - return hr; - - if (info.pFilter) IBaseFilter_Release(info.pFilter); - - if (!lstrcmpW(id, info.achName)) + if (!lstrcmpW(id, pin->name)) { - IPin_AddRef(*ret = pin); + IPin_AddRef(*ret = &pin->IPin_iface); return S_OK; } } diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index aa134ba5da..add999b4ec 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -163,12 +163,12 @@ static const IPinVtbl BaseRenderer_InputPin_Vtbl = BaseInputPinImpl_NewSegment };
-static IPin *renderer_get_pin(struct strmbase_filter *iface, unsigned int index) +static struct strmbase_pin *renderer_get_pin(struct strmbase_filter *iface, unsigned int index) { struct strmbase_renderer *filter = impl_from_strmbase_filter(iface);
if (index == 0) - return &filter->sink.pin.IPin_iface; + return &filter->sink.pin; return NULL; }
diff --git a/dlls/strmbase/transform.c b/dlls/strmbase/transform.c index 12a99eef67..e7d4d66164 100644 --- a/dlls/strmbase/transform.c +++ b/dlls/strmbase/transform.c @@ -114,14 +114,14 @@ static HRESULT source_get_media_type(struct strmbase_pin *This, unsigned int iPo return S_OK; }
-static IPin *transform_get_pin(struct strmbase_filter *iface, unsigned int index) +static struct strmbase_pin *transform_get_pin(struct strmbase_filter *iface, unsigned int index) { TransformFilter *filter = impl_from_strmbase_filter(iface);
if (index == 0) - return &filter->sink.pin.IPin_iface; + return &filter->sink.pin; else if (index == 1) - return &filter->source.pin.IPin_iface; + return &filter->source.pin; return NULL; }
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 394b919df9..479077b48f 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -1203,14 +1203,14 @@ static inline struct gstdemux_source *impl_from_IMediaSeeking(IMediaSeeking *ifa return CONTAINING_RECORD(iface, struct gstdemux_source, seek.IMediaSeeking_iface); }
-static IPin *gstdemux_get_pin(struct strmbase_filter *base, unsigned int index) +static struct strmbase_pin *gstdemux_get_pin(struct strmbase_filter *base, unsigned int index) { struct gstdemux *filter = impl_from_strmbase_filter(base);
if (!index) - return &filter->sink.IPin_iface; + return &filter->sink; else if (index <= filter->cStreams) - return &filter->ppPins[index - 1]->pin.pin.IPin_iface; + return &filter->ppPins[index - 1]->pin.pin; return NULL; }
diff --git a/dlls/wineqtdecoder/qtsplitter.c b/dlls/wineqtdecoder/qtsplitter.c index 2da0f691dc..fbec10a912 100644 --- a/dlls/wineqtdecoder/qtsplitter.c +++ b/dlls/wineqtdecoder/qtsplitter.c @@ -208,21 +208,21 @@ static inline QTInPin *impl_from_IPin(IPin *iface) * Base Filter */
-static IPin *qt_splitter_get_pin(struct strmbase_filter *base, unsigned int index) +static struct strmbase_pin *qt_splitter_get_pin(struct strmbase_filter *base, unsigned int index) { QTSplitter *filter = impl_from_strmbase_filter(base);
if (index == 0) - return &filter->pInputPin.pin.IPin_iface; + return &filter->pInputPin.pin; else if (index == 1) { if (filter->pVideo_Pin) - return &filter->pVideo_Pin->pin.pin.IPin_iface; + return &filter->pVideo_Pin->pin.pin; else if (filter->pAudio_Pin) - return &filter->pAudio_Pin->pin.pin.IPin_iface; + return &filter->pAudio_Pin->pin.pin; } else if (index == 2 && filter->pVideo_Pin && filter->pAudio_Pin) - return &filter->pAudio_Pin->pin.pin.IPin_iface; + return &filter->pAudio_Pin->pin.pin;
return NULL; } diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index fd79e9726d..dd2f8426bf 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -166,7 +166,7 @@ struct strmbase_filter
struct strmbase_filter_ops { - IPin *(*filter_get_pin)(struct strmbase_filter *iface, unsigned int index); + struct strmbase_pin *(*filter_get_pin)(struct strmbase_filter *iface, unsigned int index); void (*filter_destroy)(struct strmbase_filter *iface); HRESULT (*filter_query_interface)(struct strmbase_filter *iface, REFIID iid, void **out);
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/strmbase/pin.c | 87 +++++++-------------------------------------- 1 file changed, 12 insertions(+), 75 deletions(-)
diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c index 92a2fe55b9..4606c25a78 100644 --- a/dlls/strmbase/pin.c +++ b/dlls/strmbase/pin.c @@ -56,82 +56,18 @@ static HRESULT updatehres( HRESULT original, HRESULT new ) * If the pin given is an input pin, the message will be sent downstream to other input pins * If the pin given is an output pin, the message will be sent upstream to other output pins */ -static HRESULT SendFurther( IPin *from, SendPinFunc fnMiddle, LPVOID arg, SendPinFunc fnEnd ) +static HRESULT SendFurther(struct strmbase_sink *sink, SendPinFunc func, void *arg) { - PIN_INFO pin_info; - ULONG amount = 0; + struct strmbase_pin *pin; HRESULT hr = S_OK; - HRESULT hr_return = S_OK; - IEnumPins *enumpins = NULL; - BOOL foundend = TRUE; - PIN_DIRECTION from_dir; + unsigned int i;
- IPin_QueryDirection( from, &from_dir ); - - hr = IPin_QueryInternalConnections( from, NULL, &amount ); - if (hr != E_NOTIMPL && amount) - FIXME("Use QueryInternalConnections!\n"); - - pin_info.pFilter = NULL; - hr = IPin_QueryPinInfo( from, &pin_info ); - if (FAILED(hr)) - goto out; - - hr = IBaseFilter_EnumPins( pin_info.pFilter, &enumpins ); - if (FAILED(hr)) - goto out; - - hr = IEnumPins_Reset( enumpins ); - while (hr == S_OK) { - IPin *pin = NULL; - hr = IEnumPins_Next( enumpins, 1, &pin, NULL ); - if (hr == VFW_E_ENUM_OUT_OF_SYNC) - { - hr = IEnumPins_Reset( enumpins ); - continue; - } - if (pin) - { - PIN_DIRECTION dir; - - IPin_QueryDirection( pin, &dir ); - if (dir != from_dir) - { - IPin *connected = NULL; - - foundend = FALSE; - IPin_ConnectedTo( pin, &connected ); - if (connected) - { - HRESULT hr_local; - - hr_local = fnMiddle( connected, arg ); - hr_return = updatehres( hr_return, hr_local ); - IPin_Release(connected); - } - } - IPin_Release( pin ); - } - else - { - hr = S_OK; - break; - } - } - - if (!foundend) - hr = hr_return; - else if (fnEnd) { - HRESULT hr_local; - - hr_local = fnEnd( from, arg ); - hr_return = updatehres( hr_return, hr_local ); + for (i = 0; (pin = sink->pin.filter->ops->filter_get_pin(sink->pin.filter, i)); ++i) + { + if (pin->dir == PINDIR_OUTPUT && pin->peer) + hr = updatehres(hr, func(pin->peer, arg)); } - IEnumPins_Release(enumpins);
-out: - if (pin_info.pFilter) - IBaseFilter_Release( pin_info.pFilter ); return hr; }
@@ -799,7 +735,7 @@ HRESULT WINAPI BaseInputPinImpl_EndOfStream(IPin * iface) LeaveCriticalSection(&This->pin.filter->csFilter);
if (hr == S_OK) - hr = SendFurther( iface, deliver_endofstream, NULL, NULL ); + hr = SendFurther(This, deliver_endofstream, NULL); return hr; }
@@ -817,7 +753,7 @@ HRESULT WINAPI BaseInputPinImpl_BeginFlush(IPin * iface) EnterCriticalSection(&This->pin.filter->csFilter); This->flushing = TRUE;
- hr = SendFurther( iface, deliver_beginflush, NULL, NULL ); + hr = SendFurther(This, deliver_beginflush, NULL); LeaveCriticalSection(&This->pin.filter->csFilter);
return hr; @@ -837,7 +773,7 @@ HRESULT WINAPI BaseInputPinImpl_EndFlush(IPin * iface) EnterCriticalSection(&This->pin.filter->csFilter); This->flushing = This->end_of_stream = FALSE;
- hr = SendFurther( iface, deliver_endflush, NULL, NULL ); + hr = SendFurther(This, deliver_endflush, NULL); LeaveCriticalSection(&This->pin.filter->csFilter);
return hr; @@ -857,6 +793,7 @@ static HRESULT deliver_newsegment(IPin *pin, LPVOID data)
HRESULT WINAPI BaseInputPinImpl_NewSegment(IPin * iface, REFERENCE_TIME start, REFERENCE_TIME stop, double rate) { + struct strmbase_sink *pin = impl_sink_from_IPin(iface); newsegmentargs args;
TRACE("iface %p, start %s, stop %s, rate %.16e.\n", @@ -866,7 +803,7 @@ HRESULT WINAPI BaseInputPinImpl_NewSegment(IPin * iface, REFERENCE_TIME start, R args.tStop = stop; args.rate = rate;
- return SendFurther( iface, deliver_newsegment, &args, NULL ); + return SendFurther(pin, deliver_newsegment, &args); }
/*** IMemInputPin implementation ***/
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- The goal is essentially to get rid of BaseOutputPinImpl_Deliver(). This function is mostly a wrapper around IMemInputPin::Receive(), but which also takes the filter lock while checking if the pin is connected.
This is not particularly necessary, according to DirectShow conventions: a filter should only receive data while the graph is running, and pins cannot be connected or disconnected while the graph is running. Even in the case of dynamic reconnection, the DirectX SDK documentation specifies that the upstream filter should be manually prevented (or prevent itself) from delivering samples.
Besides this, taking the filter lock in the streaming thread can lead to temporary or permanent deadlock. We currently wait in IMediaFilter::GetState() while holding the filter lock, and the SDK documentation states that methods such as IMediaFilter::Stop() and IPin::BeginFlush() should hold the filter lock while waiting for the streaming thread to complete. One can conclude from this that the filter lock should never be taken from the streaming thread.
dlls/strmbase/transform.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/dlls/strmbase/transform.c b/dlls/strmbase/transform.c index e7d4d66164..29c385793a 100644 --- a/dlls/strmbase/transform.c +++ b/dlls/strmbase/transform.c @@ -59,6 +59,16 @@ static HRESULT WINAPI TransformFilter_Input_Receive(struct strmbase_sink *This,
TRACE("%p\n", This);
+ /* We do not expect pin connection state to change while the filter is + * running. This guarantee is necessary, since otherwise we would have to + * take the filter lock, and we can't take the filter lock from a streaming + * thread. */ + if (!pTransform->source.pMemInputPin) + { + WARN("Source is not connected, returning VFW_E_NOT_CONNECTED.\n"); + return VFW_E_NOT_CONNECTED; + } + EnterCriticalSection(&pTransform->csReceive); if (pTransform->filter.state == State_Stopped) {
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/acmwrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c index d1e4803fac..9e818579df 100644 --- a/dlls/quartz/acmwrapper.c +++ b/dlls/quartz/acmwrapper.c @@ -203,7 +203,7 @@ static HRESULT WINAPI ACMWrapper_Receive(TransformFilter *tf, IMediaSample *pSam TRACE("Sample stop time: %u.%03u\n", (DWORD)(tStart/10000000), (DWORD)((tStart/10000)%1000));
LeaveCriticalSection(&This->tf.csReceive); - hr = BaseOutputPinImpl_Deliver(&This->tf.source, pOutSample); + hr = IMemInputPin_Receive(This->tf.source.pMemInputPin, pOutSample); EnterCriticalSection(&This->tf.csReceive);
if (hr != S_OK && hr != VFW_E_NOT_CONNECTED) {
There's no reason to do this, and there may never have been.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/acmwrapper.c | 3 --- 1 file changed, 3 deletions(-)
diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c index 9e818579df..64e0018980 100644 --- a/dlls/quartz/acmwrapper.c +++ b/dlls/quartz/acmwrapper.c @@ -202,10 +202,7 @@ static HRESULT WINAPI ACMWrapper_Receive(TransformFilter *tf, IMediaSample *pSam
TRACE("Sample stop time: %u.%03u\n", (DWORD)(tStart/10000000), (DWORD)((tStart/10000)%1000));
- LeaveCriticalSection(&This->tf.csReceive); hr = IMemInputPin_Receive(This->tf.source.pMemInputPin, pOutSample); - EnterCriticalSection(&This->tf.csReceive); - if (hr != S_OK && hr != VFW_E_NOT_CONNECTED) { if (FAILED(hr)) ERR("Error sending sample (%x)\n", hr);