diff options
author | Andreas Huber <andih@google.com> | 2012-10-23 15:14:23 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-10-23 15:14:23 -0700 |
commit | bfa08b2a5e807c3d741ee2163ca9a141cf5dc144 (patch) | |
tree | 3508244d6e46faa13023e8df3a9e4f76f417fe97 /media | |
parent | e2097a5a3ea4e11b6dfa53a67ae6c101faeadcdb (diff) | |
parent | e3e639b1714d35628f9b75276839ad55d8afc74c (diff) | |
download | frameworks_av-bfa08b2a5e807c3d741ee2163ca9a141cf5dc144.zip frameworks_av-bfa08b2a5e807c3d741ee2163ca9a141cf5dc144.tar.gz frameworks_av-bfa08b2a5e807c3d741ee2163ca9a141cf5dc144.tar.bz2 |
am e3e639b1: am ac1a450a: Merge "Don\'t attempt to seek audio and video separately." into jb-mr1-dev
* commit 'e3e639b1714d35628f9b75276839ad55d8afc74c':
Don't attempt to seek audio and video separately.
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/AwesomePlayer.cpp | 26 |
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) { |