libcamera: base: shared_fd: Add comparison operators
Add == and != comparison operators between two SharedFD instances, and use them to replace manuel get() calls. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
@@ -258,7 +258,7 @@ FrameBuffer::FrameBuffer(const std::vector<Plane> &planes, unsigned int cookie)
|
||||
* Two different dmabuf file descriptors may still refer to the
|
||||
* same dmabuf instance. Check this using inodes.
|
||||
*/
|
||||
if (plane.fd.fd() != planes_[0].fd.fd()) {
|
||||
if (plane.fd != planes_[0].fd) {
|
||||
if (!inode)
|
||||
inode = fileDescriptorInode(planes_[0].fd);
|
||||
if (fileDescriptorInode(plane.fd) != inode) {
|
||||
|
||||
Reference in New Issue
Block a user