summaryrefslogtreecommitdiff
path: root/src/qcam
diff options
context:
space:
mode:
Diffstat (limited to 'src/qcam')
-rw-r--r--src/qcam/main_window.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp
index a984aaca..06ae2985 100644
--- a/src/qcam/main_window.cpp
+++ b/src/qcam/main_window.cpp
@@ -98,14 +98,14 @@ int MainWindow::startCapture()
int ret;
config_ = camera_->generateConfiguration({ StreamRole::VideoRecording });
- Stream *stream = config_.front();
ret = camera_->configure(config_);
if (ret < 0) {
std::cout << "Failed to configure camera" << std::endl;
return ret;
}
- const StreamConfiguration &cfg = config_[stream];
+ const StreamConfiguration &cfg = config_[0];
+ Stream *stream = cfg.stream();
ret = viewfinder_->setFormat(cfg.pixelFormat, cfg.size.width,
cfg.size.height);
if (ret < 0) {