summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-11-30 13:07:56 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2010-11-30 13:07:56 -0800
commitacd441dd1f44a5c6c3702dbafe3f82d52dd83d67 (patch)
tree6ea5fda739692a98e50bdf22d158863cc3944d75 /media/libstagefright
parent2d6dbfb5e3f16d800d2e0b5da283001e53e72768 (diff)
parent09b3581ef7ddba70c5d89d252de3a15d512aa49b (diff)
downloadframeworks_av-acd441dd1f44a5c6c3702dbafe3f82d52dd83d67.zip
frameworks_av-acd441dd1f44a5c6c3702dbafe3f82d52dd83d67.tar.gz
frameworks_av-acd441dd1f44a5c6c3702dbafe3f82d52dd83d67.tar.bz2
am 567b2bd1: Merge "After seeking display the first new video frame right away without concern for A/V sync. This looks much more responsive to the user." into gingerbread
* commit '567b2bd1469b1c37e6249637d313253b7d84971e': After seeking display the first new video frame right away without concern for A/V sync. This looks much more responsive to the user.
Diffstat (limited to 'media/libstagefright')
-rw-r--r--media/libstagefright/AwesomePlayer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 49fa24b..44d12e5 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -1286,6 +1286,7 @@ void AwesomePlayer::onVideoEvent() {
mVideoTimeUs = timeUs;
}
+ bool wasSeeking = mSeeking;
finishSeekIfNecessary(timeUs);
TimeSource *ts = (mFlags & AUDIO_AT_EOS) ? &mSystemTimeSource : mTimeSource;
@@ -1313,6 +1314,11 @@ void AwesomePlayer::onVideoEvent() {
int64_t latenessUs = nowUs - timeUs;
+ if (wasSeeking) {
+ // Let's display the first frame after seeking right away.
+ latenessUs = 0;
+ }
+
if (mRTPSession != NULL) {
// We'll completely ignore timestamps for gtalk videochat
// and we'll play incoming video as fast as we get it.