summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2012-10-23 13:25:05 -0700
committerAndreas Huber <andih@google.com>2012-10-23 13:25:05 -0700
commit0fc13f2d10035f0bf8505d4fb4edb1bcc5ac34ea (patch)
tree739ff7bee4fa079879d0fb464a5d37a021b18adf /media
parentc07073b8bb25e90dfe77c83a0badb4773b0377ec (diff)
downloadframeworks_av-0fc13f2d10035f0bf8505d4fb4edb1bcc5ac34ea.zip
frameworks_av-0fc13f2d10035f0bf8505d4fb4edb1bcc5ac34ea.tar.gz
frameworks_av-0fc13f2d10035f0bf8505d4fb4edb1bcc5ac34ea.tar.bz2
Don't attempt to seek audio and video separately.
The widevine extractor doesn't deal too well with that... Change-Id: Iadfeede4fe0c086af788c5639782854e4fbb98ff related-to-bug: 7262386
Diffstat (limited to 'media')
-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 685e676..1e2625a 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) {