summaryrefslogtreecommitdiff
path: root/src/android/camera_device.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/camera_device.cpp')
-rw-r--r--src/android/camera_device.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index 93659e91..ebebdac3 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -398,10 +398,16 @@ int CameraDevice::initializeStreamConfigurations()
break;
}
}
- if (camera3Format.mandatory && !mappedFormat.isValid()) {
- LOG(HAL, Error) << "Failed to map Android format "
- << camera3Format.name << " ("
- << utils::hex(androidFormat) << ")";
+
+ if (!mappedFormat.isValid()) {
+ /* If the format is not mandatory, skip it. */
+ if (!camera3Format.mandatory)
+ continue;
+
+ LOG(HAL, Error)
+ << "Failed to map mandatory Android format "
+ << camera3Format.name << " ("
+ << utils::hex(androidFormat) << "): aborting";
return -EINVAL;
}