Commit 8337959c authored by Damjan Jovanovic's avatar Damjan Jovanovic Committed by Alexandre Julliard

Return the IMemAllocator so the BaseOutputPin can store it and use it, avoiding…

Return the IMemAllocator so the BaseOutputPin can store it and use it, avoiding a NULL pointer crash.
parent 4bdfa7f8
......@@ -1352,6 +1352,8 @@ static ULONG WINAPI QTOutPin_Release(IPin *iface)
{
DeleteMediaType(This->pmt);
FreeMediaType(&This->pin.pin.mtCurrent);
if (This->pin.pAllocator)
IMemAllocator_Release(This->pin.pAllocator);
CoTaskMemFree(This);
return 0;
}
......@@ -1384,7 +1386,14 @@ static HRESULT WINAPI QTOutPin_DecideAllocator(BaseOutputPin *iface, IMemInputPi
*pAlloc = NULL;
if (QTfilter->pInputPin.pAlloc)
{
hr = IMemInputPin_NotifyAllocator(pPin, QTfilter->pInputPin.pAlloc, FALSE);
if (SUCCEEDED(hr))
{
*pAlloc = QTfilter->pInputPin.pAlloc;
IMemAllocator_AddRef(*pAlloc);
}
}
else
hr = VFW_E_NO_ALLOCATOR;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment