#include "quartz_private.h"
-#include <shlwapi.h>
-
static const WCHAR wszOutputPinName[] = { 'O','u','t','p','u','t',0 };
typedef struct AsyncReader
static ULONG WINAPI AsyncReader_Release(IBaseFilter * iface)
{
AsyncReader *This = impl_from_IBaseFilter(iface);
- ULONG refCount = BaseFilterImpl_Release(iface);
+ ULONG refCount = InterlockedDecrement(&This->filter.refCount);
TRACE("(%p)->() Release from %d\n", This, refCount + 1);
CoTaskMemFree(This->pszFileName);
if (This->pmt)
FreeMediaType(This->pmt);
+ BaseFilter_Destroy(&This->filter);
CoTaskMemFree(This);
return 0;
}
return IMemAllocator_SetProperties(pAlloc, &This->allocProps, &actual);
}
-static const BasePinFuncTable output_BaseFuncTable = {
- NULL,
- FileAsyncReaderPin_AttemptConnection,
- BasePinImpl_GetMediaTypeVersion,
- FileAsyncReaderPin_GetMediaType
-};
-
static const BaseOutputPinFuncTable output_BaseOutputFuncTable = {
+ {
+ NULL,
+ FileAsyncReaderPin_AttemptConnection,
+ BasePinImpl_GetMediaTypeVersion,
+ FileAsyncReaderPin_GetMediaType
+ },
FileAsyncReaderPin_DecideBufferSize,
BaseOutputPinImpl_DecideAllocator,
BaseOutputPinImpl_BreakConnect
piOutput.dir = PINDIR_OUTPUT;
piOutput.pFilter = pBaseFilter;
strcpyW(piOutput.achName, wszOutputPinName);
- hr = BaseOutputPin_Construct(&FileAsyncReaderPin_Vtbl, sizeof(FileAsyncReader), &piOutput, &output_BaseFuncTable, &output_BaseOutputFuncTable, pCritSec, ppPin);
+ hr = BaseOutputPin_Construct(&FileAsyncReaderPin_Vtbl, sizeof(FileAsyncReader), &piOutput, &output_BaseOutputFuncTable, pCritSec, ppPin);
if (SUCCEEDED(hr))
{