linux-v4l2: Fix select in capture thread.

This moves the enabling/resetting of the file descriptors inside the
capture loop so it is done before each select call. Why this even worked
before is unclear, but doing it the *right* way seems to reduce latency.
This commit is contained in:
fryshorts
2014-10-29 09:41:33 -07:00
committed by jp9000
parent 29e61cc68e
commit c0f6733b58
+2 -3
View File
@@ -151,12 +151,11 @@ static void *v4l2_thread(void *vptr)
data->frames = 0;
FD_ZERO(&fds);
FD_SET(data->dev, &fds);
v4l2_prep_obs_frame(data, &out, plane_offsets);
while (os_event_try(data->event) == EAGAIN) {
FD_ZERO(&fds);
FD_SET(data->dev, &fds);
tv.tv_sec = 1;
tv.tv_usec = 0;