Commit 1d39e74c authored by Paul Chitescu's avatar Paul Chitescu Committed by Alexandre Julliard

qedit: A full format is required when connecting either pin of the SampleGrabber.

parent 9cd1ce25
......@@ -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;
......
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