qedit: A full format is required when connecting either pin of the SampleGrabber.
This commit is contained in:
parent
9cd1ce2510
commit
1d39e74c7a
|
@ -1014,6 +1014,10 @@ SampleGrabber_Out_IPin_Connect(IPin *iface, IPin *receiver, const AM_MEDIA_TYPE
|
|||
}
|
||||
else
|
||||
type = &This->sg->mtype;
|
||||
if (!IsEqualGUID(&type->formattype, &FORMAT_None) &&
|
||||
!IsEqualGUID(&type->formattype, &GUID_NULL) &&
|
||||
!type->pbFormat)
|
||||
return VFW_E_TYPE_NOT_ACCEPTED;
|
||||
hr = IPin_ReceiveConnection(receiver,(IPin*)&This->lpVtbl,type);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
@ -1054,6 +1058,10 @@ SampleGrabber_In_IPin_ReceiveConnection(IPin *iface, IPin *connector, const AM_M
|
|||
!IsEqualGUID(&This->sg->mtype.formattype,&FORMAT_None) &&
|
||||
!IsEqualGUID(&This->sg->mtype.formattype,&type->formattype))
|
||||
return VFW_E_TYPE_NOT_ACCEPTED;
|
||||
if (!IsEqualGUID(&type->formattype, &FORMAT_None) &&
|
||||
!IsEqualGUID(&type->formattype, &GUID_NULL) &&
|
||||
!type->pbFormat)
|
||||
return VFW_E_TYPE_NOT_ACCEPTED;
|
||||
if (This->sg->mtype.pbFormat)
|
||||
CoTaskMemFree(This->sg->mtype.pbFormat);
|
||||
This->sg->mtype = *type;
|
||||
|
|
Loading…
Reference in New Issue