strmbase: Don't pass NULL fetched parameter in BaseOutputPinImpl_Connect on external IPin implementation.
This commit is contained in:
parent
995ff1d3f8
commit
d6f8d8f25b
|
@ -419,6 +419,9 @@ HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const
|
|||
TRACE("(%p/%p)->(%p, %p)\n", This, iface, pReceivePin, pmt);
|
||||
dump_AM_MEDIA_TYPE(pmt);
|
||||
|
||||
if (!pReceivePin)
|
||||
return E_POINTER;
|
||||
|
||||
/* If we try to connect to ourselves, we will definitely deadlock.
|
||||
* There are other cases where we could deadlock too, but this
|
||||
* catches the obvious case */
|
||||
|
@ -465,9 +468,11 @@ HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const
|
|||
/* then try receiver filter's media types */
|
||||
if (hr != S_OK && SUCCEEDED(hr = IPin_EnumMediaTypes(pReceivePin, &pEnumCandidates))) /* if we haven't already connected successfully */
|
||||
{
|
||||
ULONG fetched;
|
||||
|
||||
hr = VFW_E_NO_ACCEPTABLE_TYPES; /* Assume the worst, but set to S_OK if connected successfully */
|
||||
|
||||
while (S_OK == IEnumMediaTypes_Next(pEnumCandidates, 1, &pmtCandidate, NULL))
|
||||
while (S_OK == IEnumMediaTypes_Next(pEnumCandidates, 1, &pmtCandidate, &fetched))
|
||||
{
|
||||
assert(pmtCandidate);
|
||||
dump_AM_MEDIA_TYPE(pmtCandidate);
|
||||
|
|
Loading…
Reference in New Issue