From 02336e7229926150054f09d8e3508648ed07bc2d Mon Sep 17 00:00:00 2001 From: dsandras Date: Tue, 17 Jan 2006 22:28:26 +0000 Subject: [PATCH] Another patch from Luc Saillard to fix V4L2 support when opening/closing the device several times in a row. Thanks a lot!!!!! --- plugins/vidinput_v4l2/vidinput_v4l2.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/vidinput_v4l2/vidinput_v4l2.cxx b/plugins/vidinput_v4l2/vidinput_v4l2.cxx index fae37434..aa999aaf 100644 --- a/plugins/vidinput_v4l2/vidinput_v4l2.cxx +++ b/plugins/vidinput_v4l2/vidinput_v4l2.cxx @@ -31,6 +31,10 @@ * Nicola Orru' * * $Log$ + * Revision 1.11 2006/01/17 22:28:26 dsandras + * Another patch from Luc Saillard to fix V4L2 support when + * opening/closing the device several times in a row. Thanks a lot!!!!! + * * Revision 1.10 2006/01/09 18:22:42 dsandras * Use memset before some ioctl() to make valgrind happy. * Create a common function to set and get control information. @@ -619,6 +623,7 @@ void PVideoInputDevice_V4L2::ClearMapping() struct v4l2_buffer buf; buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + buf.memory = V4L2_MEMORY_MMAP; for (buf.index = 0; ; buf.index++) { if (::ioctl(videoFd, VIDIOC_QUERYBUF, &buf) < 0) -- 2.11.4.GIT