Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5a2a4e51 authored by Saurabh's avatar Saurabh
Browse files

Fix memory leak due to un-released gralloc buffers



When Acodec receives an error event at LoadedToIdleState,
it will not release allocated buffers which will cause gralloc
buffer leak issue. We need to first release these buffers and
then process the error event. If the application uses surfaceTexture
view, the size of leak is height x width x 10 bytes.

As a solution, when ACodec receives an error at LoadedToIdleState state
and if input and output ports buffers belong to us, free the buffers
and then report the fatal error to application.

Test: Build is successful, atest CtsVideoTestCases, atest
mediacodecTest, atest CtsMediaMiscTestCases, atest
CtsMediaPlayerTestCases

Change-Id: Ic89a316881678a0e6104b10e923c32a758d00c7c
Signed-off-by: default avatarSaurabh <sbbanore@amazon.com>
parent b328f895
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