qcap: Reference module only on successful object creation.

This commit is contained in:
Thomas Faber 2014-07-27 11:03:40 +02:00 committed by Alexandre Julliard
parent a910704ccf
commit 33e0e6867f
1 changed files with 1 additions and 1 deletions

View File

@ -732,7 +732,6 @@ VfwPin_Construct( IBaseFilter * pBaseFilter, LPCRITICAL_SECTION pCritSec,
piOutput.dir = PINDIR_OUTPUT;
piOutput.pFilter = pBaseFilter;
lstrcpyW(piOutput.achName, wszOutputPinName);
ObjectRefCount(TRUE);
hr = BaseOutputPin_Construct(&VfwPin_Vtbl, sizeof(VfwPinImpl), &piOutput, &output_BaseOutputFuncTable, pCritSec, ppPin);
@ -740,6 +739,7 @@ VfwPin_Construct( IBaseFilter * pBaseFilter, LPCRITICAL_SECTION pCritSec,
{
VfwPinImpl *pPinImpl = (VfwPinImpl*)*ppPin;
pPinImpl->KSP_VT = &KSP_VTable;
ObjectRefCount(TRUE);
}
return hr;