From 71f6d269db0c87eeba1e924d1d68485c79711943 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 7 Nov 2024 11:13:44 +0100 Subject: [PATCH] v4l2: first probe and then update port flags The probe is to decide it we can use EXPBUF or not and this is used to decide on the flags. This got broken with 842ac9e110606ffcd696e5d90183cf88cba24221 --- spa/plugins/v4l2/v4l2-utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spa/plugins/v4l2/v4l2-utils.c b/spa/plugins/v4l2/v4l2-utils.c index e36944f8c..a03639f51 100644 --- a/spa/plugins/v4l2/v4l2-utils.c +++ b/spa/plugins/v4l2/v4l2-utils.c @@ -1048,6 +1048,8 @@ static int spa_v4l2_set_format(struct impl *this, struct spa_video_info *format, size->width = fmt.fmt.pix.width; size->height = fmt.fmt.pix.height; + probe_expbuf(this); + port->fmt = fmt; port->info.change_mask |= SPA_PORT_CHANGE_MASK_FLAGS | SPA_PORT_CHANGE_MASK_RATE; port->info.flags = (port->alloc_buffers ? SPA_PORT_FLAG_CAN_ALLOC_BUFFERS : 0) | @@ -1057,8 +1059,6 @@ static int spa_v4l2_set_format(struct impl *this, struct spa_video_info *format, port->info.rate.num = streamparm.parm.capture.timeperframe.numerator; port->info.rate.denom = streamparm.parm.capture.timeperframe.denominator; - probe_expbuf(this); - return match ? 0 : 1; }