v4l2allocator: Add protection against broken libv4l2
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Tue, 9 Dec 2014 22:39:12 +0000 (17:39 -0500)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Tue, 16 Dec 2014 18:42:22 +0000 (13:42 -0500)
commit1fe4a19dc22e58742e94c08246bf4ea40f33c58d
tree8a0a1f652deb3947e3ffbf8077ed23cc6c2f4f92
parent6b2fc2de8d4adddb394e83b463146655d1d68dd7
v4l2allocator: Add protection against broken libv4l2

It looks like libv4l2 support for CREATE_BUF is incomplete. That
combine with existing bugs may lead to crash in GStreamer. These
check will make it robust by:

- Checking create buf index isn't an already in used index
- Checking that the index out of QUERYBUF matches the requested
  index
sys/v4l2/gstv4l2allocator.c