summaryrefslogtreecommitdiff
path: root/v4l2-apps/lib/libv4l
diff options
context:
space:
mode:
authorhans@localhost.localdomain <hans@localhost.localdomain>2008-08-03 14:35:38 +0200
committerhans@localhost.localdomain <hans@localhost.localdomain>2008-08-03 14:35:38 +0200
commitbad01ca943742b5a2938b3718abc8590a0f3929d (patch)
tree9770fdfb8a93e5ebc599cfab1a37ca47dcdeef3a /v4l2-apps/lib/libv4l
parent3dbcf4e987933e8e41ff496e76223f457a7609e5 (diff)
downloadmediapointer-dvb-s2-bad01ca943742b5a2938b3718abc8590a0f3929d.tar.gz
mediapointer-dvb-s2-bad01ca943742b5a2938b3718abc8590a0f3929d.tar.bz2
libv4l: mpa buffers before queuing
From: Hans de Goede <j.w.r.degoede@hhs.nl> With some drivers the buffers must be mapped before queuing, so when converting map the (real) buffers before calling the qbuf ioctl Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Diffstat (limited to 'v4l2-apps/lib/libv4l')
-rw-r--r--v4l2-apps/lib/libv4l/ChangeLog2
-rw-r--r--v4l2-apps/lib/libv4l/libv4l2/libv4l2.c5
2 files changed, 7 insertions, 0 deletions
diff --git a/v4l2-apps/lib/libv4l/ChangeLog b/v4l2-apps/lib/libv4l/ChangeLog
index 45c9cca63..cdd29fac8 100644
--- a/v4l2-apps/lib/libv4l/ChangeLog
+++ b/v4l2-apps/lib/libv4l/ChangeLog
@@ -3,6 +3,8 @@ libv4l-0.4.0
* Be more relaxed in our checks for mixing read and mmap access, we were
being more strict in this then certain kernel drivers (bttv) making xawtv
unhappy
+* With some drivers the buffers must be mapped before queuing, so when
+ converting map the (real) buffers before calling the qbuf ioctl
* Add support for conversion to RGB24 (before we only supported BGR24) based
on a patch by Jean-Francois Moine
* Various Makefile and pkgconfig file improvements by Gregor Jasny (Debian)
diff --git a/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c b/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c
index 2a0dd4837..d6a8a6d2a 100644
--- a/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c
+++ b/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c
@@ -798,6 +798,11 @@ int v4l2_ioctl (int fd, unsigned long int request, ...)
if ((result = v4l2_deactivate_read_stream(index)))
break;
+ /* With some drivers the buffers must be mapped before queuing */
+ if (converting)
+ if ((result = v4l2_map_buffers(index)))
+ break;
+
result = syscall(SYS_ioctl, devices[index].fd, VIDIOC_QBUF, arg);
break;