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

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Akihiro Sagawa 2020-05-20 23:36:01 +09:00 committed by Alexandre Julliard
parent 5ab64243da
commit b9dc3324d7
1 changed files with 10 additions and 7 deletions

View File

@ -516,6 +516,8 @@ static HRESULT WINAPI source_Connect(IPin *iface, IPin *peer, const AM_MEDIA_TYP
return hr;
}
if (pin->pFuncsTable->base.pin_get_media_type)
{
for (i = 0; pin->pFuncsTable->base.pin_get_media_type(&pin->pin, i, &candidate) == S_OK; ++i)
{
strmbase_dump_media_type(&candidate);
@ -528,6 +530,7 @@ static HRESULT WINAPI source_Connect(IPin *iface, IPin *peer, const AM_MEDIA_TYP
}
FreeMediaType(&candidate);
}
}
if (SUCCEEDED(IPin_EnumMediaTypes(peer, &enummt)))
{