summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/AwesomePlayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'media/libstagefright/AwesomePlayer.cpp')
-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.