aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSauhard Pande <sauhardp@codeaurora.org>2017-07-06 21:27:05 +0530
committerDavide Garberi <dade.garberi@gmail.com>2018-01-19 14:11:24 +0100
commite9ee841fc1e1745482d104fa499d2209823c2bc3 (patch)
tree7f28abd8a16fe6c5e101d90f7dae96e3422694f0
parente6982920e65be11bc75de3834cf35bd6665f6e58 (diff)
QCamer2:HAL3: VTS configurestream fix for invalid rotation value.
Issue: ValidateStreamRotation was not checking invalid rotation values (-1) due to this vts test cases is failing. Fix: Added check for invalid rotation value (-1) in validatestreamR- otation. Change-Id: Ia14cad8974dc9086b59d87ba3e7aa2c80e89a5f7 Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
-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",