Fix the memory leak during high speed recording
During high speed recording, 4 CaptureResults are marked in the mPartialResults at one time, but only 1 is removed. This change fixes to remove requestCount of CaptureResults at one time. Bug: 271052477 Change-Id: I15efe031ef37315118f65b8a3e82f4aec68d9820
This commit is contained in:
@@ -2228,6 +2228,12 @@ public class CameraDeviceImpl extends CameraDevice
|
||||
} else {
|
||||
List<CaptureResult> partialResults =
|
||||
mFrameNumberTracker.popPartialResults(frameNumber);
|
||||
if (mBatchOutputMap.containsKey(requestId)) {
|
||||
int requestCount = mBatchOutputMap.get(requestId);
|
||||
for (int i = 1; i < requestCount; i++) {
|
||||
mFrameNumberTracker.popPartialResults(frameNumber - (requestCount - i));
|
||||
}
|
||||
}
|
||||
|
||||
final long sensorTimestamp =
|
||||
result.get(CaptureResult.SENSOR_TIMESTAMP);
|
||||
|
||||
Reference in New Issue
Block a user