v4l2: handle nearest set_format

The set_format function can return 1 when the format was adjusted to the
nearest supported format so return this from the port_set_param
function.

This instructs the adapter to recheck the configured format so that it
can store the adjuted format on the converter.
This commit is contained in:
Wim Taymans 2025-03-28 16:00:51 +01:00
parent 8d7175a1e7
commit 2d26fbcddf

View file

@ -675,7 +675,7 @@ static int port_set_format(struct impl *this, struct port *port,
const struct spa_pod *format)
{
struct spa_video_info info;
int res;
int res = 0;
spa_zero(info);
@ -755,7 +755,7 @@ static int port_set_format(struct impl *this, struct port *port,
emit_port_info(this, port, false);
emit_node_info(this, false);
return 0;
return res;
}
static int impl_node_port_set_param(void *object,