click: fix camera failure after zoom usage
libcamera was changing the image resolution without updating mRawWidth and mRawHeight, and this caused initRaw to take pictures with the previous resolution. If that resolution was unsuitable because of zoom level, it would cause the camera to fail until it was restarted. This patch updates both variables to reflect the modified resolution so initRaw always takes pictures with the correct width and height. Change-Id: I33e8445a65ac667a030b35b103f86be46381abc4
This commit is contained in:
parent
3219d207b4
commit
ff9d9e3fa4
@ -2015,7 +2015,9 @@ void QualcommCameraHardware::setZoom()
|
||||
multiplier = getParm("picture-size", picturesize);
|
||||
LOGV("Reducing picture quality; new multiplier: %d", multiplier);
|
||||
}
|
||||
level = zoomsel * (iscamcorder ? (multiplier*5)/6 : 5);
|
||||
level = zoomsel * (iscamcorder ? (multiplier*5) / 6 : 5);
|
||||
//Update the parameters so initRaw doesn't use the wrong size later
|
||||
mParameters.getPictureSize(&mRawWidth, &mRawHeight);
|
||||
LOGV("Level: %d, Multiplier: %d ZoomSel: %d",level,multiplier,zoomsel);
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user