Maarten Lankhorst : quartz: Handle case where ReceiveConnection is called on an already connected pin.

Alexandre Julliard julliard at winehq.org
Wed Jun 25 04:47:08 CDT 2008


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

Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date:   Sun Jun 22 00:57:47 2008 -0700

quartz: Handle case where ReceiveConnection is called on an already connected pin.

---

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

diff --git a/dlls/quartz/pin.c b/dlls/quartz/pin.c
index 766dad9..edf321d 100644
--- a/dlls/quartz/pin.c
+++ b/dlls/quartz/pin.c
@@ -1287,6 +1287,7 @@ HRESULT WINAPI PullPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const
     dump_AM_MEDIA_TYPE(pmt);
 
     EnterCriticalSection(This->pin.pCritSec);
+    if (!This->pin.pConnectedTo)
     {
         ALLOCATOR_PROPERTIES props;
 
@@ -1295,9 +1296,6 @@ HRESULT WINAPI PullPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const
         props.cbAlign = 1;
         props.cbPrefix = 0;
 
-        if (This->pin.pConnectedTo)
-            hr = VFW_E_ALREADY_CONNECTED;
-
         if (SUCCEEDED(hr) && (This->pin.fnQueryAccept(This->pin.pUserData, pmt) != S_OK))
             hr = VFW_E_TYPE_NOT_ACCEPTED; /* FIXME: shouldn't we just map common errors onto 
                                            * VFW_E_TYPE_NOT_ACCEPTED and pass the value on otherwise? */
@@ -1349,6 +1347,8 @@ HRESULT WINAPI PullPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const
              This->pAlloc = NULL;
         }
     }
+    else
+        hr = VFW_E_ALREADY_CONNECTED;
     LeaveCriticalSection(This->pin.pCritSec);
     return hr;
 }




More information about the wine-cvs mailing list