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
parent
29e61cc68e
commit
c0f6733b58
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue