summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2012-10-23 15:06:11 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-23 15:06:11 -0700
commitac1a450a76c2f42f66c876200cb724d1e93ef4c7 (patch)
tree3e057e9d0b0b886911b63fef635ad2195c825673
parent6ccc3c343e2751ebfe9fa77215bf84e1a97e38fc (diff)
parent14744c076e2e361f049e8c3c43cef502ba3fcbd5 (diff)
Merge "Don't attempt to seek audio and video separately." into jb-mr1-dev
-rw-r--r--media/libstagefright/AwesomePlayer.cpp26
1 files changed, 17 insertions, 9 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 685e676b..1e2625a6 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -1707,7 +1707,8 @@ void AwesomePlayer::onVideoEvent() {
}
}
- if ((mFlags & TEXTPLAYER_INITIALIZED) && !(mFlags & (TEXT_RUNNING | SEEK_PREVIEW))) {
+ if ((mFlags & TEXTPLAYER_INITIALIZED)
+ && !(mFlags & (TEXT_RUNNING | SEEK_PREVIEW))) {
mTextDriver->start();
modifyFlags(TEXT_RUNNING, SET);
}
@@ -1753,17 +1754,24 @@ void AwesomePlayer::onVideoEvent() {
&& mAudioPlayer != NULL
&& mAudioPlayer->getMediaTimeMapping(
&realTimeUs, &mediaTimeUs)) {
- ALOGI("we're much too late (%.2f secs), video skipping ahead",
- latenessUs / 1E6);
+ if (mWVMExtractor == NULL) {
+ ALOGI("we're much too late (%.2f secs), video skipping ahead",
+ latenessUs / 1E6);
- mVideoBuffer->release();
- mVideoBuffer = NULL;
+ mVideoBuffer->release();
+ mVideoBuffer = NULL;
- mSeeking = SEEK_VIDEO_ONLY;
- mSeekTimeUs = mediaTimeUs;
+ mSeeking = SEEK_VIDEO_ONLY;
+ mSeekTimeUs = mediaTimeUs;
- postVideoEvent_l();
- return;
+ postVideoEvent_l();
+ return;
+ } else {
+ // The widevine extractor doesn't deal well with seeking
+ // audio and video independently. We'll just have to wait
+ // until the decoder catches up, which won't be long at all.
+ ALOGI("we're very late (%.2f secs)", latenessUs / 1E6);
+ }
}
if (latenessUs > 40000) {