diff --git a/spa/plugins/libcamera/libcamera-utils.c b/spa/plugins/libcamera/libcamera-utils.c index 3998eefe3..bc34d9082 100644 --- a/spa/plugins/libcamera/libcamera-utils.c +++ b/spa/plugins/libcamera/libcamera-utils.c @@ -481,6 +481,10 @@ static int spa_libcamera_set_format(struct impl *this, struct spa_video_info *fo libcamera_set_streamcfg_width(dev->camera, size->width); libcamera_set_streamcfg_height(dev->camera, size->height); + if(!libcamera_set_config(dev->camera)) { + return -EINVAL; + } + /* start the camera now with the configured params */ libcamera_start_capture(dev->camera); diff --git a/spa/plugins/libcamera/libcamera_wrapper.cpp b/spa/plugins/libcamera/libcamera_wrapper.cpp index d836d5fb4..00dda7a91 100644 --- a/spa/plugins/libcamera/libcamera_wrapper.cpp +++ b/spa/plugins/libcamera/libcamera_wrapper.cpp @@ -486,10 +486,6 @@ extern "C" { } int LibCamera::start() { - if(!this->set_config()) { - return -1; - } - this->streamName_.clear(); for (unsigned int index = 0; index < this->config_->size(); ++index) { StreamConfiguration &cfg = this->config_->at(index);