v4l2: probe EXPBUF and disable alloc_buffer flag

After we set the format, probe if we can do EXPBUF and enable/disable
the ALLOC_BUFFERS flag on the port.

This should gracefully handle the case where EXPBUF is not available.

Fixes #3821
This commit is contained in:
Wim Taymans 2024-01-29 16:37:16 +01:00
parent 18b112bcfe
commit c690aedc89
2 changed files with 46 additions and 2 deletions

View file

@ -71,6 +71,7 @@ struct port {
struct impl *impl;
bool alloc_buffers;
bool probed_expbuf;
bool have_expbuf;
bool next_fmtdesc;
@ -1020,8 +1021,7 @@ impl_init(const struct spa_handle_factory *factory,
port->info.params = port->params;
port->info.n_params = N_PORT_PARAMS;
port->alloc_buffers = true;
port->have_expbuf = true;
port->probed_expbuf = false;
port->have_query_ext_ctrl = true;
port->dev.log = this->log;
port->dev.fd = -1;