v4l2src: fix v4l2_munmap() for compressed formats
authorOleksij Rempel (Alexey Fisher) <bug-track@fisher-privat.net>
Thu, 1 Mar 2012 13:15:29 +0000 (14:15 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sat, 3 Mar 2012 13:07:40 +0000 (13:07 +0000)
commit4cd9255f0a8a9e15d81561f00f02d275b5095f70
treeabc82613257bba45c066ba1105e9286616123b22
parent50cd7c9ac6f2d64d8b43e03f2b248efa02dafe4c
v4l2src: fix v4l2_munmap() for compressed formats

Make sure we always call munmap() with the same size we called mmap()
with before.

Current v4l2src uses the same structure for VIDIOC_QUERYBUF, VIDIOC_QBUF
and v4l2_munmap calls. The problem is that the video buffer size (length)
may vary for compressed or emulated bufs. VIDIOC_QBUF will change it if
we pass the pointer of a v4l2_buffer. This is why we should avoid using
same variable for mmap and video buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=671126
sys/v4l2/gstv4l2bufferpool.c
sys/v4l2/gstv4l2bufferpool.h