Skip to content

Commit

Permalink
v4l2stream: don't show a warning in case of possibly expected EAGAIN
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmanuelP committed Nov 6, 2024
1 parent 20e783c commit 578fd0b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/arvv4l2stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,18 @@ arv_v4l2_stream_thread (void *data)

memset (&bufd, 0, sizeof bufd);
bufd.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
bufd.memory = thread_data->io_method == ARV_V4L2_STREAM_IO_METHOD_MMAP ?
bufd.memory =
thread_data->io_method == ARV_V4L2_STREAM_IO_METHOD_MMAP ?
V4L2_MEMORY_MMAP : V4L2_MEMORY_USERPTR;
bufd.index = 0;

if(arv_v4l2_ioctl(thread_data->v4l2_fd, VIDIOC_DQBUF, &bufd) == -1) {
arv_warning_stream_thread("DeQueue buffer error (%s)", strerror(errno));
switch (errno) {
case EAGAIN:
continue;
default:
arv_warning_stream_thread("Dequeue buffer error (%s)", strerror(errno));
continue;
}
} else
arv_trace_stream_thread ("Dequeued buffer %d\n", bufd.index);
Expand Down

0 comments on commit 578fd0b

Please sign in to comment.