summaryrefslogtreecommitdiff
path: root/v4l2-apps/libv4l/libv4l2
diff options
context:
space:
mode:
authorhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-03-11 13:09:27 +0100
committerhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-03-11 13:09:27 +0100
commit93d4ae910ce9eeaa5998e3aa1980c3647d959fc6 (patch)
tree1874817846c244f071c2f91f0c019b790b811d76 /v4l2-apps/libv4l/libv4l2
parente4def927f3ed43a4763652a0911f69180e803721 (diff)
downloadmediapointer-dvb-s2-93d4ae910ce9eeaa5998e3aa1980c3647d959fc6.tar.gz
mediapointer-dvb-s2-93d4ae910ce9eeaa5998e3aa1980c3647d959fc6.tar.bz2
libv4l: Don't report DQBUF errors when errno is EAGAIN
From: Hans de Goede <hdegoede@redhat.com> Don't report DQBUF errors when errno is EAGAIN, this fixes flooding the screen with errors when applications use non blocking mode Priority: normal Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'v4l2-apps/libv4l/libv4l2')
-rw-r--r--v4l2-apps/libv4l/libv4l2/libv4l2.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/v4l2-apps/libv4l/libv4l2/libv4l2.c b/v4l2-apps/libv4l/libv4l2/libv4l2.c
index d60ed6d39..314087255 100644
--- a/v4l2-apps/libv4l/libv4l2/libv4l2.c
+++ b/v4l2-apps/libv4l/libv4l2/libv4l2.c
@@ -264,9 +264,11 @@ static int v4l2_dequeue_and_convert(int index, struct v4l2_buffer *buf,
do {
if ((result = syscall(SYS_ioctl, devices[index].fd, VIDIOC_DQBUF, buf))) {
- int saved_err = errno;
- V4L2_LOG_ERR("dequeuing buf: %s\n", strerror(errno));
- errno = saved_err;
+ if (errno != EAGAIN) {
+ int saved_err = errno;
+ V4L2_LOG_ERR("dequeuing buf: %s\n", strerror(errno));
+ errno = saved_err;
+ }
return result;
}