Module: wine Branch: master Commit: 1d39e74c7aee86b8a142c0625e406504f9b47640 URL: http://source.winehq.org/git/wine.git/?a=commit;h=1d39e74c7aee86b8a142c0625e...
Author: Paul Chitescu paulc@voip.null.ro Date: Mon Mar 1 09:57:40 2010 -0800
qedit: A full format is required when connecting either pin of the SampleGrabber.
---
dlls/qedit/samplegrabber.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c index b4912eb..d09d554 100644 --- a/dlls/qedit/samplegrabber.c +++ b/dlls/qedit/samplegrabber.c @@ -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;