aboutsummaryrefslogtreecommitdiff
path: root/camera/QCamera2
diff options
context:
space:
mode:
Diffstat (limited to 'camera/QCamera2')
-rw-r--r--camera/QCamera2/HAL3/QCamera3HWI.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/camera/QCamera2/HAL3/QCamera3HWI.cpp b/camera/QCamera2/HAL3/QCamera3HWI.cpp
index 4acf761..14d15a5 100644
--- a/camera/QCamera2/HAL3/QCamera3HWI.cpp
+++ b/camera/QCamera2/HAL3/QCamera3HWI.cpp
@@ -1667,6 +1667,7 @@ int QCamera3HardwareInterface::configureStreamsPerfLocked(
"stream size : %d x %d, stream rotation = %d",
newStream->stream_type, newStream->format,
newStream->width, newStream->height, newStream->rotation);
+
//if the stream is in the mStreamList validate it
bool stream_exists = false;
for (List<stream_info_t*>::iterator it=mStreamInfo.begin();
@@ -10100,6 +10101,14 @@ int QCamera3HardwareInterface::validateStreamRotations(
bool isZsl = (newStream->stream_type == CAMERA3_STREAM_BIDIRECTIONAL &&
isImplDef);
+ if(newStream->rotation == -1) {
+ LOGE("ERROR: Invalid stream rotation requested for stream"
+ "type %d and stream format: %d", newStream->stream_type,
+ newStream->format);
+ rc = -EINVAL;
+ break;
+ }
+
if (isRotated && (!isImplDef || isZsl)) {
LOGE("Error: Unsupported rotation of %d requested for stream"
"type:%d and stream format:%d",