Commit ed4df696 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

qcap: Use IMemAllocator::GetBuffer() and IMediaSample::SetTime() directly.

parent 859809be
......@@ -350,9 +350,14 @@ static HRESULT WINAPI AVICompressorIn_Receive(struct strmbase_sink *base, IMedia
return hres;
}
hres = BaseOutputPinImpl_GetDeliveryBuffer(&This->source, &out_sample, &start, &stop, 0);
if(FAILED(hres))
if (FAILED(hres = IMemAllocator_GetBuffer(This->source.pAllocator, &out_sample, &start, &stop, 0)))
{
ERR("Failed to get sample, hr %#x.\n", hres);
return hres;
}
if (FAILED(hres = IMediaSample_SetTime(out_sample, &start, &stop)))
ERR("Failed to set time, hr %#x.\n", hres);
hres = IMediaSample_GetPointer(out_sample, &buf);
if(FAILED(hres))
......
......@@ -165,7 +165,7 @@ static DWORD WINAPI stream_thread(void *arg)
LeaveCriticalSection(&filter->state_cs);
if (FAILED(hr = BaseOutputPinImpl_GetDeliveryBuffer(&filter->source, &sample, NULL, NULL, 0)))
if (FAILED(hr = IMemAllocator_GetBuffer(filter->source.pAllocator, &sample, NULL, NULL, 0)))
{
ERR("Failed to get sample, hr %#x.\n", hr);
break;
......
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