Occurs for some extractors that use shared memory without MediaBufferObserver.
Check with high resolution MKV.
Play a mkv file continuously and check file descriptor count.
adb shell lsof | grep mediae | wc
adb shell lsof | grep medias | wc
Test: Photos with mkv.
Bug:
36359517
Change-Id: I8719b628406a838ee091499347b219a8a4736a25
Signed-off-by: yuedl1 <yuedl1@lenovo.com>
}
}
if (transferBuf != nullptr) { // Using shared buffers.
- if (!transferBuf->isObserved()) {
+ if (!transferBuf->isObserved() && transferBuf != buf) {
// Transfer buffer must be part of a MediaBufferGroup.
ALOGV("adding shared memory buffer %p to local group", transferBuf);
mGroup->add_buffer(transferBuf);