strmbase: do not lock in BaseOutputPinImpl_GetDeliveryBuffer the MemInputPin will lock in the required places.
This commit is contained in:
parent
2ebfd01b51
commit
c736af74dc
|
@ -580,27 +580,23 @@ HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(BaseOutputPin *This, IMediaSa
|
||||||
|
|
||||||
TRACE("(%p, %p, %p, %x)\n", ppSample, tStart, tStop, dwFlags);
|
TRACE("(%p, %p, %p, %x)\n", ppSample, tStart, tStop, dwFlags);
|
||||||
|
|
||||||
EnterCriticalSection(This->pin.pCritSec);
|
if (!This->pin.pConnectedTo)
|
||||||
|
hr = VFW_E_NOT_CONNECTED;
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (!This->pin.pConnectedTo)
|
IMemAllocator * pAlloc = NULL;
|
||||||
hr = VFW_E_NOT_CONNECTED;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
IMemAllocator * pAlloc = NULL;
|
|
||||||
|
|
||||||
hr = IMemInputPin_GetAllocator(This->pMemInputPin, &pAlloc);
|
hr = IMemInputPin_GetAllocator(This->pMemInputPin, &pAlloc);
|
||||||
|
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
hr = IMemAllocator_GetBuffer(pAlloc, ppSample, tStart, tStop, dwFlags);
|
hr = IMemAllocator_GetBuffer(pAlloc, ppSample, tStart, tStop, dwFlags);
|
||||||
|
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
hr = IMediaSample_SetTime(*ppSample, tStart, tStop);
|
hr = IMediaSample_SetTime(*ppSample, tStart, tStop);
|
||||||
|
|
||||||
if (pAlloc)
|
if (pAlloc)
|
||||||
IMemAllocator_Release(pAlloc);
|
IMemAllocator_Release(pAlloc);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
LeaveCriticalSection(This->pin.pCritSec);
|
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue