diff options
| author | 2011-03-28 08:34:06 -0700 | |
|---|---|---|
| committer | 2011-03-28 08:34:06 -0700 | |
| commit | ab13a89c997fafcfbbb10ed31008893863e39a37 (patch) | |
| tree | 85fed9c81d97f541e322217bb061fc21082a5ce7 | |
| parent | 3c630f336347e73ba62730f5f52d1462327df940 (diff) | |
| parent | a4a81aef39b15649bda146476d98f23ac554887f (diff) | |
am a4a81aef: am e7cedad2: am 2edbdcc6: Merge "After a seek there\'s a brief period where audio time isn\'t reestablished." into honeycomb-mr1
* commit 'a4a81aef39b15649bda146476d98f23ac554887f':
After a seek there's a brief period where audio time isn't reestablished.
| -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 07f250a81fb2..162d2e65b5c7 100644 --- a/media/libstagefright/AudioPlayer.cpp +++ b/media/libstagefright/AudioPlayer.cpp @@ -452,6 +452,10 @@ int64_t AudioPlayer::getMediaTimeUs() { Mutex::Autolock autoLock(mLock); if (mPositionTimeMediaUs < 0 || mPositionTimeRealUs < 0) { + if (mSeeking) { + return mSeekTimeUs; + } + return 0; } @@ -477,6 +481,7 @@ status_t AudioPlayer::seekTo(int64_t time_us) { Mutex::Autolock autoLock(mLock); mSeeking = true; + mPositionTimeRealUs = mPositionTimeMediaUs = -1; mReachedEOS = false; mSeekTimeUs = time_us; |