Don't crash on the L5

This commit is contained in:
Martijn Braam
2023-07-12 14:48:52 +02:00
parent 3ee314a68d
commit 472f84b741

View File

@@ -382,6 +382,11 @@ update_state(MPPipeline *pipeline, const struct mp_io_pipeline_state *state)
mode_capture = io_camera->modes[m];
}
}
if (mode_preview == NULL && mode_capture != NULL) {
// If no fast preview mode is available, make do with
// slow modes.
mode_preview = mode_capture;
}
if (mode_preview != NULL) {
if (io_camera->video_fd == 0) {
libmegapixels_open(io_camera);