[QEDIT]
authorChristoph von Wittich <christoph_vw@reactos.org>
Sat, 6 Mar 2010 11:10:27 +0000 (11:10 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Sat, 6 Mar 2010 11:10:27 +0000 (11:10 +0000)
sync qedit to wine 1.1.40

svn path=/trunk/; revision=45913

reactos/dll/directx/qedit/samplegrabber.c

index b4912eb..d09d554 100644 (file)
@@ -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;