am e7cedad2: am 2edbdcc6: Merge "After a seek there\'s a brief period where audio time isn\'t reestablished." into honeycomb-mr1

* commit 'e7cedad2b8408a13c610f3a7fcf13597a432a37d':
  After a seek there's a brief period where audio time isn't reestablished.
This commit is contained in:
Andreas Huber
2011-03-28 08:26:21 -07:00
committed by Android Git Automerger

View File

@@ -405,6 +405,10 @@ int64_t AudioPlayer::getMediaTimeUs() {
Mutex::Autolock autoLock(mLock);
if (mPositionTimeMediaUs < 0 || mPositionTimeRealUs < 0) {
if (mSeeking) {
return mSeekTimeUs;
}
return 0;
}
@@ -430,6 +434,7 @@ status_t AudioPlayer::seekTo(int64_t time_us) {
Mutex::Autolock autoLock(mLock);
mSeeking = true;
mPositionTimeRealUs = mPositionTimeMediaUs = -1;
mReachedEOS = false;
mSeekTimeUs = time_us;