strmbase: Add structure size parameter in BaseInputPin_Construct function.
This commit is contained in:
parent
e9cc54268c
commit
5c8339df4a
|
@ -367,7 +367,8 @@ static HRESULT WINAPI MediaStreamFilterImpl_AddMediaStream(IMediaStreamFilter* i
|
||||||
/* Pin name is "I{guid MSPID_PrimaryVideo or MSPID_PrimaryAudio}" */
|
/* Pin name is "I{guid MSPID_PrimaryVideo or MSPID_PrimaryAudio}" */
|
||||||
info.achName[0] = 'I';
|
info.achName[0] = 'I';
|
||||||
StringFromGUID2(&purpose_id, info.achName + 1, 40);
|
StringFromGUID2(&purpose_id, info.achName + 1, 40);
|
||||||
hr = BaseInputPin_Construct(&MediaStreamFilter_InputPin_Vtbl, &info, &input_BaseFuncTable, &input_BaseInputFuncTable, &This->filter.csFilter, NULL, &This->pins[This->nb_streams]);
|
hr = BaseInputPin_Construct(&MediaStreamFilter_InputPin_Vtbl, sizeof(BaseInputPin), &info, &input_BaseFuncTable,
|
||||||
|
&input_BaseInputFuncTable, &This->filter.csFilter, NULL, &This->pins[This->nb_streams]);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
|
|
|
@ -1237,7 +1237,7 @@ static HRESULT InputPin_Init(const IPinVtbl *InputPin_Vtbl, const PIN_INFO * pPi
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, const PIN_INFO * pPinInfo,
|
HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, LONG inputpin_size, const PIN_INFO * pPinInfo,
|
||||||
const BasePinFuncTable* pBaseFuncsTable, const BaseInputPinFuncTable* pBaseInputFuncsTable,
|
const BasePinFuncTable* pBaseFuncsTable, const BaseInputPinFuncTable* pBaseInputFuncsTable,
|
||||||
LPCRITICAL_SECTION pCritSec, IMemAllocator *allocator, IPin ** ppPin)
|
LPCRITICAL_SECTION pCritSec, IMemAllocator *allocator, IPin ** ppPin)
|
||||||
{
|
{
|
||||||
|
@ -1245,6 +1245,7 @@ HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, const PIN_INFO * p
|
||||||
|
|
||||||
*ppPin = NULL;
|
*ppPin = NULL;
|
||||||
|
|
||||||
|
assert(inputpin_size >= sizeof(BaseInputPin));
|
||||||
assert(pBaseFuncsTable->pfnCheckMediaType);
|
assert(pBaseFuncsTable->pfnCheckMediaType);
|
||||||
|
|
||||||
if (pPinInfo->dir != PINDIR_INPUT)
|
if (pPinInfo->dir != PINDIR_INPUT)
|
||||||
|
@ -1253,7 +1254,7 @@ HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, const PIN_INFO * p
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
pPinImpl = CoTaskMemAlloc(sizeof(*pPinImpl));
|
pPinImpl = CoTaskMemAlloc(inputpin_size);
|
||||||
|
|
||||||
if (!pPinImpl)
|
if (!pPinImpl)
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
|
|
|
@ -253,7 +253,8 @@ HRESULT WINAPI BaseRenderer_Init(BaseRenderer * This, const IBaseFilterVtbl *Vtb
|
||||||
piInput.pFilter = &This->filter.IBaseFilter_iface;
|
piInput.pFilter = &This->filter.IBaseFilter_iface;
|
||||||
lstrcpynW(piInput.achName, wcsInputPinName, sizeof(piInput.achName) / sizeof(piInput.achName[0]));
|
lstrcpynW(piInput.achName, wcsInputPinName, sizeof(piInput.achName) / sizeof(piInput.achName[0]));
|
||||||
|
|
||||||
hr = BaseInputPin_Construct(&BaseRenderer_InputPin_Vtbl, &piInput, &input_BaseFuncTable, &input_BaseInputFuncTable, &This->filter.csFilter, NULL, (IPin **)&This->pInputPin);
|
hr = BaseInputPin_Construct(&BaseRenderer_InputPin_Vtbl, sizeof(BaseInputPin), &piInput, &input_BaseFuncTable,
|
||||||
|
&input_BaseInputFuncTable, &This->filter.csFilter, NULL, (IPin **)&This->pInputPin);
|
||||||
|
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
{
|
{
|
||||||
|
|
|
@ -225,7 +225,8 @@ static HRESULT TransformFilter_Init(const IBaseFilterVtbl *pVtbl, const CLSID* p
|
||||||
piOutput.pFilter = &pTransformFilter->filter.IBaseFilter_iface;
|
piOutput.pFilter = &pTransformFilter->filter.IBaseFilter_iface;
|
||||||
lstrcpynW(piOutput.achName, wcsOutputPinName, sizeof(piOutput.achName) / sizeof(piOutput.achName[0]));
|
lstrcpynW(piOutput.achName, wcsOutputPinName, sizeof(piOutput.achName) / sizeof(piOutput.achName[0]));
|
||||||
|
|
||||||
hr = BaseInputPin_Construct(&TransformFilter_InputPin_Vtbl, &piInput, &tf_input_BaseFuncTable, &tf_input_BaseInputFuncTable, &pTransformFilter->filter.csFilter, NULL, &pTransformFilter->ppPins[0]);
|
hr = BaseInputPin_Construct(&TransformFilter_InputPin_Vtbl, sizeof(BaseInputPin), &piInput, &tf_input_BaseFuncTable,
|
||||||
|
&tf_input_BaseInputFuncTable, &pTransformFilter->filter.csFilter, NULL, &pTransformFilter->ppPins[0]);
|
||||||
|
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
{
|
{
|
||||||
|
|
|
@ -145,7 +145,9 @@ HRESULT WINAPI BaseInputPinImpl_BeginFlush(IPin * iface);
|
||||||
HRESULT WINAPI BaseInputPinImpl_EndFlush(IPin * iface);
|
HRESULT WINAPI BaseInputPinImpl_EndFlush(IPin * iface);
|
||||||
HRESULT WINAPI BaseInputPinImpl_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
|
HRESULT WINAPI BaseInputPinImpl_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
|
||||||
|
|
||||||
HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, const PIN_INFO * pPinInfo, const BasePinFuncTable* pBaseFuncsTable, const BaseInputPinFuncTable* pBaseInputFuncsTable, LPCRITICAL_SECTION pCritSec, IMemAllocator *, IPin ** ppPin);
|
HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, LONG inputpin_size, const PIN_INFO * pPinInfo,
|
||||||
|
const BasePinFuncTable* pBaseFuncsTable, const BaseInputPinFuncTable* pBaseInputFuncsTable,
|
||||||
|
LPCRITICAL_SECTION pCritSec, IMemAllocator *, IPin ** ppPin);
|
||||||
|
|
||||||
typedef struct BaseFilter
|
typedef struct BaseFilter
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue