summaryrefslogtreecommitdiff
path: root/v4l2-apps/libv4l
diff options
context:
space:
mode:
authorhans@localhost.localdomain <hans@localhost.localdomain>2009-05-21 16:49:03 +0200
committerhans@localhost.localdomain <hans@localhost.localdomain>2009-05-21 16:49:03 +0200
commite021d3a000c760f4af4aa098b1d5a2dd24a86129 (patch)
treeef4321d3e41bbc63fb69a3486bd5d47c1fea6b02 /v4l2-apps/libv4l
parentfbb8b6b6db6a69404ec9735bff66ca628dd6c2f5 (diff)
downloadmediapointer-dvb-s2-e021d3a000c760f4af4aa098b1d5a2dd24a86129.tar.gz
mediapointer-dvb-s2-e021d3a000c760f4af4aa098b1d5a2dd24a86129.tar.bz2
libv4l: fix detection of conversion mode in v4l2_buffers_mapped()
From: Hans de Goede <hdegoede@redhat.com> libv4l: fix detection of conversion mode in v4l2_buffers_mapped() Priority: normal Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'v4l2-apps/libv4l')
-rw-r--r--v4l2-apps/libv4l/ChangeLog4
-rw-r--r--v4l2-apps/libv4l/libv4l2/libv4l2.c6
2 files changed, 4 insertions, 6 deletions
diff --git a/v4l2-apps/libv4l/ChangeLog b/v4l2-apps/libv4l/ChangeLog
index 73b237a93..673eee4c0 100644
--- a/v4l2-apps/libv4l/ChangeLog
+++ b/v4l2-apps/libv4l/ChangeLog
@@ -1,18 +1,16 @@
libv4l-0.5.98
-------------
-* Genius E-M 112 needs both upside down and whitebalance flags
* Some makefile improvements by Gregor Jasny
* If the card name contains a / replace it with a - in the shm name
-* Only created shared memory segment when we have fake v4l2 controls
* Add sq905 to the list of devices which benefit from whitebalancing
* Support V4L2_CTRL_FLAG_NEXT_CTRL for fake controls by Adam Baker
* Add ability to determine upside down cams based on DMI info
-* Fix a bug in v4lconvert_uyvy_to_yuv420()
* Add support for separate vflipping and hflipping
* Add fake controls controlling the software h- and v-flipping
* Rewrite video processing code to make it easier to add more video filters
(and with little extra processing cost). As part of this the normalize
filter has been removed as it wasn't functioning satisfactory anyways
+* Various small bugfixes and tweaks
libv4l-0.5.97
-------------
diff --git a/v4l2-apps/libv4l/libv4l2/libv4l2.c b/v4l2-apps/libv4l/libv4l2/libv4l2.c
index 4f88ffd73..2562987b4 100644
--- a/v4l2-apps/libv4l/libv4l2/libv4l2.c
+++ b/v4l2-apps/libv4l/libv4l2/libv4l2.c
@@ -369,8 +369,8 @@ static int v4l2_buffers_mapped(int index)
{
unsigned int i;
- if (devices[index].src_fmt.fmt.pix.pixelformat ==
- devices[index].dest_fmt.fmt.pix.pixelformat) {
+ if (!v4lconvert_needs_conversion(devices[index].convert,
+ &devices[index].src_fmt, &devices[index].dest_fmt)) {
/* Normal (no conversion) mode */
struct v4l2_buffer buf;
@@ -559,7 +559,6 @@ int v4l2_close(int fd)
/* Free resources */
v4l2_unmap_buffers(index);
- v4lconvert_destroy(devices[index].convert);
if (devices[index].convert_mmap_buf != MAP_FAILED) {
if (v4l2_buffers_mapped(index))
V4L2_LOG_WARN("v4l2 mmap buffers still mapped on close()\n");
@@ -568,6 +567,7 @@ int v4l2_close(int fd)
devices[index].no_frames * V4L2_FRAME_BUF_SIZE);
devices[index].convert_mmap_buf = MAP_FAILED;
}
+ v4lconvert_destroy(devices[index].convert);
/* Remove the fd from our list of managed fds before closing it, because as
soon as we've done the actual close the fd maybe returned by an open in