Fix mplayer crash caused by r25116

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25121 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
voroshil 2007-11-20 17:19:16 +00:00
parent cf446beff5
commit 49b320c00c
1 changed files with 10 additions and 0 deletions

View File

@ -2146,6 +2146,16 @@ static HRESULT get_available_formats_pin(ICaptureGraphBuilder2 * pBuilder,
if (!pBuilder || !chain->pCaptureFilter)
return E_POINTER;
if (!chain->pCapturePin)
{
hr = OLE_CALL_ARGS(pBuilder, FindPin,
(IUnknown *) chain->pCaptureFilter,
PINDIR_OUTPUT, &PIN_CATEGORY_CAPTURE,
chain->majortype, FALSE, 0, &chain->pCapturePin);
if (!chain->pCapturePin)
return E_POINTER;
}
if (chain->type == video) {
size = sizeof(VIDEO_STREAM_CONFIG_CAPS);
} else if (chain->type == audio) {