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

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-11-26 17:39:16 -06:00 committed by Alexandre Julliard
parent ce275f38a0
commit b31cca3438
1 changed files with 8 additions and 1 deletions

View File

@ -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) static HRESULT WINAPI AVICompressorIn_Receive(struct strmbase_sink *base, IMediaSample *pSample)
{ {
AVICompressor *This = impl_from_strmbase_pin(&base->pin); AVICompressor *This = impl_from_strmbase_pin(&base->pin);
IMemInputPin *meminput = This->source.pMemInputPin;
VIDEOINFOHEADER *src_videoinfo; VIDEOINFOHEADER *src_videoinfo;
REFERENCE_TIME start, stop; REFERENCE_TIME start, stop;
IMediaSample *out_sample; IMediaSample *out_sample;
@ -429,6 +430,12 @@ static HRESULT WINAPI AVICompressorIn_Receive(struct strmbase_sink *base, IMedia
TRACE("(%p)->(%p)\n", base, pSample); 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) { if(!This->hic) {
FIXME("Driver not loaded\n"); FIXME("Driver not loaded\n");
return E_UNEXPECTED; return E_UNEXPECTED;
@ -490,7 +497,7 @@ static HRESULT WINAPI AVICompressorIn_Receive(struct strmbase_sink *base, IMedia
else else
IMediaSample_SetMediaTime(out_sample, NULL, NULL); IMediaSample_SetMediaTime(out_sample, NULL, NULL);
hres = BaseOutputPinImpl_Deliver(&This->source, out_sample); hres = IMemInputPin_Receive(meminput, out_sample);
if(FAILED(hres)) if(FAILED(hres))
WARN("Deliver failed: %08x\n", hres); WARN("Deliver failed: %08x\n", hres);