Maarten Lankhorst : quartz: Fix bugs that occur during connection.

Alexandre Julliard julliard at winehq.org
Mon Jul 21 08:52:03 CDT 2008


Module: wine
Branch: master
Commit: 271ee48301838dd549d368100bfcf63cb7a8df48
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=271ee48301838dd549d368100bfcf63cb7a8df48

Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date:   Thu Jul 17 17:37:51 2008 -0700

quartz: Fix bugs that occur during connection.

---

 dlls/quartz/pin.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/dlls/quartz/pin.c b/dlls/quartz/pin.c
index 5daaf7e..e2b868e 100644
--- a/dlls/quartz/pin.c
+++ b/dlls/quartz/pin.c
@@ -192,19 +192,15 @@ static HRESULT OutputPin_ConnectSpecific(IPin * iface, IPin * pReceivePin, const
             hr = IMemInputPin_GetAllocator(This->pMemInputPin, &pMemAlloc);
 
             if (hr == VFW_E_NO_ALLOCATOR)
-            {
                 /* Input pin provides no allocator, use standard memory allocator */
                 hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (LPVOID*)&pMemAlloc);
 
-                if (SUCCEEDED(hr))
-                {
-                    hr = IMemInputPin_NotifyAllocator(This->pMemInputPin, pMemAlloc, This->readonly);
-                }
-            }
-
             if (SUCCEEDED(hr))
                 hr = IMemAllocator_SetProperties(pMemAlloc, &This->allocProps, &actual);
 
+            if (SUCCEEDED(hr))
+                hr = IMemInputPin_NotifyAllocator(This->pMemInputPin, pMemAlloc, This->readonly);
+
             if (pMemAlloc)
                 IMemAllocator_Release(pMemAlloc);
         }
@@ -940,7 +936,9 @@ HRESULT WINAPI OutputPin_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDI
                 while (S_OK == IEnumMediaTypes_Next(pEnumCandidates, 1, &pmtCandidate, NULL))
                 {
                     assert(pmtCandidate);
-                    if (!IsEqualGUID(&FORMAT_None, &pmtCandidate->formattype))
+                    dump_AM_MEDIA_TYPE(pmtCandidate);
+                    if (!IsEqualGUID(&FORMAT_None, &pmtCandidate->formattype)
+                        && !IsEqualGUID(&GUID_NULL, &pmtCandidate->formattype))
                         assert(pmtCandidate->pbFormat);
                     if (( !pmt || CompareMediaTypes(pmt, pmtCandidate, TRUE) ) && 
                         (This->pConnectSpecific(iface, pReceivePin, pmtCandidate) == S_OK))
@@ -963,7 +961,9 @@ HRESULT WINAPI OutputPin_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDI
                 while (S_OK == IEnumMediaTypes_Next(pEnumCandidates, 1, &pmtCandidate, NULL))
                 {
                     assert(pmtCandidate);
-                    if (!IsEqualGUID(&FORMAT_None, &pmtCandidate->formattype))
+                    dump_AM_MEDIA_TYPE(pmtCandidate);
+                    if (!IsEqualGUID(&FORMAT_None, &pmtCandidate->formattype)
+                        && !IsEqualGUID(&GUID_NULL, &pmtCandidate->formattype))
                         assert(pmtCandidate->pbFormat);
                     if (( !pmt || CompareMediaTypes(pmt, pmtCandidate, TRUE) ) && 
                         (This->pConnectSpecific(iface, pReceivePin, pmtCandidate) == S_OK))




More information about the wine-cvs mailing list