diff options
author | hans@localhost.localdomain <hans@localhost.localdomain> | 2009-05-21 16:49:03 +0200 |
---|---|---|
committer | hans@localhost.localdomain <hans@localhost.localdomain> | 2009-05-21 16:49:03 +0200 |
commit | e021d3a000c760f4af4aa098b1d5a2dd24a86129 (patch) | |
tree | ef4321d3e41bbc63fb69a3486bd5d47c1fea6b02 /v4l2-apps/libv4l/libv4l2 | |
parent | fbb8b6b6db6a69404ec9735bff66ca628dd6c2f5 (diff) | |
download | mediapointer-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/libv4l2')
-rw-r--r-- | v4l2-apps/libv4l/libv4l2/libv4l2.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 |