qcap: Reference module only on successful object creation.
This commit is contained in:
parent
a910704ccf
commit
33e0e6867f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue