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.
master
fryshorts 2014-10-25 16:24:56 +02:00 committed by jp9000
parent 29e61cc68e
commit c0f6733b58
1 changed files with 2 additions and 3 deletions

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;