quartz: Don't return a pointer to a stack variable in AMFilterData_ParseFilterData().
This commit is contained in:
parent
e11f637c57
commit
56659c3a70
|
@ -689,8 +689,7 @@ static HRESULT DXDiag_InitDXDiagDirectShowFiltersContainer(IDxDiagContainer* pSu
|
|||
SUCCEEDED(IFilterMapper2_QueryInterface(pFileMapper, &IID_IAMFilterData, (void **)&pFilterData)))
|
||||
{
|
||||
DWORD array_size;
|
||||
BYTE *tmp;
|
||||
REGFILTER2 *pRF = NULL;
|
||||
REGFILTER2 *pRF;
|
||||
|
||||
if (SUCCEEDED(IPropertyBag_Read(pPropFilterBag, wszFilterDataName, &v, NULL)) &&
|
||||
SUCCEEDED(SafeArrayAccessData(V_UNION(&v, parray), (LPVOID*) &pData)))
|
||||
|
@ -698,10 +697,8 @@ static HRESULT DXDiag_InitDXDiagDirectShowFiltersContainer(IDxDiagContainer* pSu
|
|||
ULONG j;
|
||||
array_size = V_UNION(&v, parray)->rgsabound->cElements;
|
||||
|
||||
if (SUCCEEDED(IAMFilterData_ParseFilterData(pFilterData, pData, array_size, &tmp)))
|
||||
if (SUCCEEDED(IAMFilterData_ParseFilterData(pFilterData, pData, array_size, (BYTE **)&pRF)))
|
||||
{
|
||||
pRF = ((REGFILTER2 **)tmp)[0];
|
||||
|
||||
snprintfW(bufferW, sizeof(bufferW)/sizeof(bufferW[0]), szVersionFormat, pRF->dwVersion);
|
||||
if (pRF->dwVersion == 1)
|
||||
{
|
||||
|
@ -721,7 +718,7 @@ static HRESULT DXDiag_InitDXDiagDirectShowFiltersContainer(IDxDiagContainer* pSu
|
|||
}
|
||||
|
||||
dwMerit = pRF->dwMerit;
|
||||
CoTaskMemFree(tmp);
|
||||
CoTaskMemFree(pRF);
|
||||
}
|
||||
|
||||
SafeArrayUnaccessData(V_UNION(&v, parray));
|
||||
|
|
|
@ -1778,7 +1778,7 @@ static HRESULT WINAPI AMFilterData_ParseFilterData(IAMFilterData* iface,
|
|||
prf2 = CoTaskMemAlloc(sizeof(*prf2));
|
||||
if (!prf2)
|
||||
return E_OUTOFMEMORY;
|
||||
*ppRegFilter2 = (BYTE *)&prf2;
|
||||
*ppRegFilter2 = (BYTE *)prf2;
|
||||
|
||||
hr = FM2_ReadFilterData(pData, prf2);
|
||||
if (FAILED(hr))
|
||||
|
|
Loading…
Reference in New Issue