mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-10-14 20:02:38 +00:00
v4l2: don't select DmaBuf when the type mask is invalid
an invalid data type mask means that the caller did not explicitly allowed DmaBuf so fall back to memptr or memfd. Fixes #1054
This commit is contained in:
parent
cd79cdfb40
commit
9c8a578e21
|
@ -1457,7 +1457,9 @@ mmap_init(struct impl *this,
|
|||
|
||||
spa_log_debug(this->log, "v4l2: data types %08x", d[0].type);
|
||||
|
||||
if (port->have_expbuf && (d[0].type & (1u << SPA_DATA_DmaBuf))) {
|
||||
if (port->have_expbuf &&
|
||||
d[0].type != SPA_ID_INVALID &&
|
||||
(d[0].type & (1u << SPA_DATA_DmaBuf))) {
|
||||
struct v4l2_exportbuffer expbuf;
|
||||
|
||||
spa_zero(expbuf);
|
||||
|
|
Loading…
Reference in a new issue