Skip to content
Commit 2d99c9f9 authored by Rucha Katakwar's avatar Rucha Katakwar
Browse files

Camera:Fix the memory leak caused during HFR mode.

During high speed recording mode, it was observed that there was a
memory leak due to too many nodes at mPendingFrameNumbersWithOtherType
list. After ag/1962479 added batching for HFR it only updates the
FrameNumberTracker every 4 or 8 frames during high speed recording. This
change fixes that by updating every frame. A map is used to store
requestIds which have batchOutput. For every such requests we update
each frame in the batch in a for loop.

bug: 194618660

Test: 1. Did validity check with the change. Now frameNumber is incremented
by 1 instead of every 4 or 8 in FrameNumberTracker.
2. The mPendingFrameNumbersWithOtherType for otherType is empty during
HFR recording.
3. Verified using other modes of camera and did not observe any
crashes.
4. CTS tests Pass.

Change-Id: I2638e6663e7b70e4ef7a29dfeb27d423c9c7137d
(cherry picked from commit 236ed73e)
parent a888b50f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment