diff options
author | Andreas Huber <andih@google.com> | 2011-03-25 16:36:13 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2011-03-25 16:40:50 -0700 |
commit | fe9b71919cdddf898a516169db840751878098ca (patch) | |
tree | 137c583ebc201f04bbc2a8628a955f1b8da20b77 /media/libstagefright | |
parent | 75ae0de858be5cddf60b70d3056e393aa12b224e (diff) | |
download | frameworks_av-fe9b71919cdddf898a516169db840751878098ca.zip frameworks_av-fe9b71919cdddf898a516169db840751878098ca.tar.gz frameworks_av-fe9b71919cdddf898a516169db840751878098ca.tar.bz2 |
After a seek there's a brief period where audio time isn't reestablished.
Don't use audio time to trigger a "we're very late, skipping ahead" action
until it's reestablished.
Change-Id: Ia8534e5bed60203d49a457d14b2e55eb972b5fa1
related-to-bug: 4173683
Diffstat (limited to 'media/libstagefright')
-rw-r--r-- | media/libstagefright/AudioPlayer.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/media/libstagefright/AudioPlayer.cpp b/media/libstagefright/AudioPlayer.cpp index e7c0299..bd04a26 100644 --- a/media/libstagefright/AudioPlayer.cpp +++ b/media/libstagefright/AudioPlayer.cpp @@ -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; |