Commit b9dc3324 authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

strmbase: Allow NULL pin_get_media_type() callback in source_Connect().

parent 5ab64243
...@@ -516,17 +516,20 @@ static HRESULT WINAPI source_Connect(IPin *iface, IPin *peer, const AM_MEDIA_TYP ...@@ -516,17 +516,20 @@ static HRESULT WINAPI source_Connect(IPin *iface, IPin *peer, const AM_MEDIA_TYP
return hr; return hr;
} }
for (i = 0; pin->pFuncsTable->base.pin_get_media_type(&pin->pin, i, &candidate) == S_OK; ++i) if (pin->pFuncsTable->base.pin_get_media_type)
{ {
strmbase_dump_media_type(&candidate); for (i = 0; pin->pFuncsTable->base.pin_get_media_type(&pin->pin, i, &candidate) == S_OK; ++i)
if (compare_media_types(mt, &candidate)
&& pin->pFuncsTable->pfnAttemptConnection(pin, peer, &candidate) == S_OK)
{ {
LeaveCriticalSection(&pin->pin.filter->csFilter); strmbase_dump_media_type(&candidate);
if (compare_media_types(mt, &candidate)
&& pin->pFuncsTable->pfnAttemptConnection(pin, peer, &candidate) == S_OK)
{
LeaveCriticalSection(&pin->pin.filter->csFilter);
FreeMediaType(&candidate);
return S_OK;
}
FreeMediaType(&candidate); FreeMediaType(&candidate);
return S_OK;
} }
FreeMediaType(&candidate);
} }
if (SUCCEEDED(IPin_EnumMediaTypes(peer, &enummt))) if (SUCCEEDED(IPin_EnumMediaTypes(peer, &enummt)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment