Zebediah Figura : qcap: Use IMemAllocator::GetBuffer() and IMediaSample::SetTime() directly.
Alexandre Julliard
julliard at winehq.org
Mon Feb 7 15:56:03 CST 2022
Module: wine
Branch: master
Commit: ed4df6964cb9517c9d962ea16f3033e0a08e0365
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ed4df6964cb9517c9d962ea16f3033e0a08e0365
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Sun Feb 6 20:59:42 2022 -0600
qcap: Use IMemAllocator::GetBuffer() and IMediaSample::SetTime() directly.
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/qcap/avico.c | 9 +++++++--
dlls/qcap/vfwcapture.c | 2 +-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/dlls/qcap/avico.c b/dlls/qcap/avico.c
index e8a452fc7f5..b56a051d67b 100644
--- a/dlls/qcap/avico.c
+++ b/dlls/qcap/avico.c
@@ -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))
diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c
index 7e6b0ee5afe..84d6c093cc6 100644
--- a/dlls/qcap/vfwcapture.c
+++ b/dlls/qcap/vfwcapture.c
@@ -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;
More information about the wine-cvs
mailing list