v4l2: allocator: Don't close foreign dmabuf
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Tue, 25 Jul 2023 19:14:11 +0000 (15:14 -0400)
committerTim-Philipp Müller <tim@centricular.com>
Mon, 21 Aug 2023 22:52:57 +0000 (23:52 +0100)
commit426bf399d4dfa35b6482fd54912b33af2ce64228
tree6d983138cff613728dd7cf279b1521db83156d10
parentdf9482f39bdbb31e77bb32aca865c0f37d5dab6c
v4l2: allocator: Don't close foreign dmabuf

Imported dmabuf are not being duped, so they should never be closed. Instead,
we ensure their live time by having strong reference on their original
buffer. This should fix potential flickering due to dmabuf being closed
too early.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5217>
subprojects/gst-plugins-good/sys/v4l2/gstv4l2allocator.c