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

Skip to content
Commit 69039fc6 authored by Chuangjie Xia's avatar Chuangjie Xia Committed by Wonsik Kim
Browse files

Fix fd leak in media.codec

If codec process is killed quickly after starting to decode, there may be
fd leak in media.codec.
Before all buffers are ready, SimpleSoftOMXComponent keeps the state as
OMX_StateLoaded. At this time, codec process is killed,
OMXNodeInstance::onObserverDied() -> freeNode()->
SimpleSoftOMXComponent::getState(...). And the state is OMX_StateLoaded.
Currently, the freeActiveBuffers() is not called at state OMX_StateLoaded
and the allocated buffers are leaked.

Solution is to free allocated buffers at state OMX_StateLoaded.

Bug: 135003556
Test: Some apps use SoundPool to play sound. Quickly kill the process
after start play.
Change-Id: I9de74cd2cb63e1aa96fd2397f3a72d976d1b2183
parent 255f610f
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