Paul Chitescu : qedit: In SampleGrabber ReceiveConnection check early the format type, return VFW_E_INVALIDMEDIATYPE like native.
Alexandre Julliard
julliard at winehq.org
Mon Mar 15 12:19:34 CDT 2010
Module: wine
Branch: master
Commit: 5650a9eb8b095fe2e170d5a6dec3f12c544fba3a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5650a9eb8b095fe2e170d5a6dec3f12c544fba3a
Author: Paul Chitescu <paulc at voip.null.ro>
Date: Fri Mar 12 11:33:14 2010 +0200
qedit: In SampleGrabber ReceiveConnection check early the format type, return VFW_E_INVALIDMEDIATYPE like native.
---
dlls/qedit/samplegrabber.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c
index d09d554..c766cfa 100644
--- a/dlls/qedit/samplegrabber.c
+++ b/dlls/qedit/samplegrabber.c
@@ -1048,6 +1048,10 @@ SampleGrabber_In_IPin_ReceiveConnection(IPin *iface, IPin *connector, const AM_M
debugstr_guid(&type->majortype), debugstr_guid(&type->subtype),
type->lSampleSize,
debugstr_guid(&type->formattype), type->cbFormat);
+ if (!IsEqualGUID(&type->formattype, &FORMAT_None) &&
+ !IsEqualGUID(&type->formattype, &GUID_NULL) &&
+ !type->pbFormat)
+ return VFW_E_INVALIDMEDIATYPE;
if (!IsEqualGUID(&This->sg->mtype.majortype,&GUID_NULL) &&
!IsEqualGUID(&This->sg->mtype.majortype,&type->majortype))
return VFW_E_TYPE_NOT_ACCEPTED;
@@ -1058,10 +1062,6 @@ 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;
More information about the wine-cvs
mailing list