From de6386c9c2e84a19f1d14738bfac4caf9ed803ee Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Sun, 22 Jun 2008 00:57:47 -0700 Subject: [PATCH] quartz: handle case where ReceiveConnection is called on a connected pin better --- 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; } -- 1.5.4.1