Zebediah Figura : qcap: Get rid of V4l_Prepare().
Alexandre Julliard
julliard at winehq.org
Thu Apr 11 13:10:30 CDT 2019
Module: wine
Branch: master
Commit: bc42cc42795ef04624cb7b3ec98b24a8db44554d
URL: https://source.winehq.org/git/wine.git/?a=commit;h=bc42cc42795ef04624cb7b3ec98b24a8db44554d
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Wed Apr 10 22:32:00 2019 -0500
qcap: Get rid of V4l_Prepare().
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/qcap/v4l.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c
index 752751a..ab39b71 100644
--- a/dlls/qcap/v4l.c
+++ b/dlls/qcap/v4l.c
@@ -122,15 +122,6 @@ static int xioctl(int fd, int request, void * arg)
return r;
}
-/* Prepare the capture buffers */
-static HRESULT V4l_Prepare(Capture *device)
-{
- device->image_size = device->height * device->width * 3;
- if (!(device->image_data = heap_alloc(device->image_size)))
- return E_OUTOFMEMORY;
- return S_OK;
-}
-
HRESULT qcap_driver_destroy(Capture *capBox)
{
TRACE("%p\n", capBox);
@@ -392,10 +383,10 @@ static DWORD WINAPI ReadThread(LPVOID lParam)
ULONG framecount = 0;
unsigned char *pTarget, *pInput, *pOutput;
- hr = V4l_Prepare(capBox);
- if (FAILED(hr))
+ capBox->image_size = capBox->height * capBox->width * 3;
+ if (!(capBox->image_data = heap_alloc(capBox->image_size)))
{
- ERR("Stop IFilterGraph: %x\n", hr);
+ ERR("Failed to allocate memory.\n");
capBox->thread = 0;
capBox->stopped = TRUE;
return 0;
More information about the wine-cvs
mailing list