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
Loading
Please register or sign in to comment