econsystems / opencv_v4l2

This project contains sample OpenCV application code as well as V4L2 helper library to access camera devices in OpenCV. This code helps to achieve high framerates from cameras in OpenCV. This project gives better results than the VideoCapture class in OpenCV. This source code is only compatible in Linux.
BSD 3-Clause "New" or "Revised" License
39 stars 22 forks source link

lib: clear the buffers in the correct place #6

Open sivaraam opened 5 years ago

sivaraam commented 5 years ago

It has been noted that in some cases, clearing the buffers REQBUFS(0) before unmapping the buffers (in case of MMAP) results in the REQBUFS(0) call failing.

Avoid this by properly clearing the buffers after unmapping the buffers rather than doing it before.