mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
v4l2object: Disable DMABuf for emulated formats
libv4l2 does not prevent exporting DMABuf even when emulated formats are in use. As a side effect, userspace ends up with buffers of the original formats which will cause issues. https://bugzilla.gnome.org/show_bug.cgi?id=795097
This commit is contained in:
parent
ebf8a6d0c0
commit
2d774554e9
1 changed files with 6 additions and 0 deletions
|
@ -2878,6 +2878,12 @@ gst_v4l2_object_is_dmabuf_supported (GstV4l2Object * v4l2object)
|
|||
.flags = O_CLOEXEC | O_RDWR,
|
||||
};
|
||||
|
||||
if (v4l2object->fmtdesc->flags & V4L2_FMT_FLAG_EMULATED) {
|
||||
GST_WARNING_OBJECT (v4l2object->dbg_obj,
|
||||
"libv4l2 converter detected, disabling DMABuf");
|
||||
ret = FALSE;
|
||||
}
|
||||
|
||||
/* Expected to fail, but ENOTTY tells us that it is not implemented. */
|
||||
v4l2object->ioctl (v4l2object->video_fd, VIDIOC_EXPBUF, &expbuf);
|
||||
if (errno == ENOTTY)
|
||||
|
|
Loading…
Reference in a new issue