diff options
author | Andreas Huber <andih@google.com> | 2011-03-28 08:11:26 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-03-28 08:11:26 -0700 |
commit | 98442ddd86ea33453c2db10cfbfc310ae49dce8f (patch) | |
tree | 8f29483fd8d74fa1a3fd35709f6b2b0c97e1cc41 /media/libstagefright | |
parent | 5dac87b088556b8ed7f2a4f5546d31be0bb68680 (diff) | |
parent | fe9b71919cdddf898a516169db840751878098ca (diff) | |
download | frameworks_av-98442ddd86ea33453c2db10cfbfc310ae49dce8f.zip frameworks_av-98442ddd86ea33453c2db10cfbfc310ae49dce8f.tar.gz frameworks_av-98442ddd86ea33453c2db10cfbfc310ae49dce8f.tar.bz2 |
Merge "After a seek there's a brief period where audio time isn't reestablished." into honeycomb-mr1
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; |