From b31cca343835348e7a5b46646d2ab1322925938d Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Tue, 26 Nov 2019 17:39:16 -0600 Subject: [PATCH] qcap/avico: Call IMemInputPin::Receive() directly. Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- dlls/qcap/avico.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/qcap/avico.c b/dlls/qcap/avico.c index 2e81a6b0c4f..f0f60ae4394 100644 --- a/dlls/qcap/avico.c +++ b/dlls/qcap/avico.c @@ -415,6 +415,7 @@ static HRESULT sink_query_interface(struct strmbase_pin *iface, REFIID iid, void static HRESULT WINAPI AVICompressorIn_Receive(struct strmbase_sink *base, IMediaSample *pSample) { AVICompressor *This = impl_from_strmbase_pin(&base->pin); + IMemInputPin *meminput = This->source.pMemInputPin; VIDEOINFOHEADER *src_videoinfo; REFERENCE_TIME start, stop; IMediaSample *out_sample; @@ -429,6 +430,12 @@ static HRESULT WINAPI AVICompressorIn_Receive(struct strmbase_sink *base, IMedia TRACE("(%p)->(%p)\n", base, pSample); + if (!meminput) + { + WARN("Source is not connected, returning VFW_E_NOT_CONNECTED.\n"); + return VFW_E_NOT_CONNECTED; + } + if(!This->hic) { FIXME("Driver not loaded\n"); return E_UNEXPECTED; @@ -490,7 +497,7 @@ static HRESULT WINAPI AVICompressorIn_Receive(struct strmbase_sink *base, IMedia else IMediaSample_SetMediaTime(out_sample, NULL, NULL); - hres = BaseOutputPinImpl_Deliver(&This->source, out_sample); + hres = IMemInputPin_Receive(meminput, out_sample); if(FAILED(hres)) WARN("Deliver failed: %08x\n", hres); -- 2.11.4.GIT