summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/camera.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
index b4197f95..e3144c5b 100644
--- a/src/libcamera/camera.cpp
+++ b/src/libcamera/camera.cpp
@@ -366,6 +366,11 @@ Camera::streamConfiguration(std::set<Stream *> &streams)
if (disconnected_ || !streams.size())
return std::map<Stream *, StreamConfiguration>{};
+ for (Stream *stream : streams) {
+ if (streams_.find(stream) == streams_.end())
+ return std::map<Stream *, StreamConfiguration>{};
+ }
+
return pipe_->streamConfiguration(this, streams);
}
@@ -409,6 +414,11 @@ int Camera::configureStreams(std::map<Stream *, StreamConfiguration> &config)
return -EINVAL;
}
+ for (auto const &iter : config) {
+ if (streams_.find(iter.first) == streams_.end())
+ return -EINVAL;
+ }
+
ret = pipe_->configureStreams(this, config);
if (ret)
return ret;