Zebediah Figura : qcap/avico: Call IMemInputPin::Receive() directly.

Alexandre Julliard julliard at winehq.org
Wed Nov 27 16:32:28 CST 2019


Module: wine
Branch: master
Commit: b31cca343835348e7a5b46646d2ab1322925938d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=b31cca343835348e7a5b46646d2ab1322925938d

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Tue Nov 26 17:39:16 2019 -0600

qcap/avico: Call IMemInputPin::Receive() directly.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 2e81a6b0c4..f0f60ae439 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);
 




More information about the wine-cvs mailing list