Merge "After a seek there's a brief period where audio time isn't reestablished." into honeycomb-mr1
This commit is contained in:
committed by
Android (Google) Code Review
commit
2edbdcc6f2
@@ -405,6 +405,10 @@ int64_t AudioPlayer::getMediaTimeUs() {
|
|||||||
Mutex::Autolock autoLock(mLock);
|
Mutex::Autolock autoLock(mLock);
|
||||||
|
|
||||||
if (mPositionTimeMediaUs < 0 || mPositionTimeRealUs < 0) {
|
if (mPositionTimeMediaUs < 0 || mPositionTimeRealUs < 0) {
|
||||||
|
if (mSeeking) {
|
||||||
|
return mSeekTimeUs;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -430,6 +434,7 @@ status_t AudioPlayer::seekTo(int64_t time_us) {
|
|||||||
Mutex::Autolock autoLock(mLock);
|
Mutex::Autolock autoLock(mLock);
|
||||||
|
|
||||||
mSeeking = true;
|
mSeeking = true;
|
||||||
|
mPositionTimeRealUs = mPositionTimeMediaUs = -1;
|
||||||
mReachedEOS = false;
|
mReachedEOS = false;
|
||||||
mSeekTimeUs = time_us;
|
mSeekTimeUs = time_us;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user