Skip to content

Commit 1c8bc7b

Browse files
author
James Dong
committed
When filling the cache, we always time out waiting for a condition that won't occur.
We are actually improving the power consumption for streaming applications like Pandora. Change-Id: Id32bacbc962e8c69c056599479b308d6a07b7a20
1 parent 821ca51 commit 1c8bc7b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

media/libstagefright/Prefetcher.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,10 @@ void Prefetcher::threadFunc() {
148148
if (mDone) {
149149
break;
150150
}
151+
151152
mCondition.waitRelative(
152-
mLock, fillingCache ? 10000000ll : 1000000000ll);
153+
mLock, fillingCache ? 1ll : 1000000000ll);
154+
153155

154156
ssize_t minIndex = -1;
155157
for (size_t i = 0; i < mSources.size(); ++i) {

0 commit comments

Comments
 (0)