summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoger1 Jonsson <roger1.jonsson@sonymobile.com>2012-10-11 10:32:33 +0200
committerTakeshi Aimi <takeshi.aimi@sonymobile.com>2013-12-18 17:39:24 +0900
commit5432aea4b1b107b722ddb507c610bdfc4c61c8aa (patch)
tree4114d0788ef523b2aab2838d182c8d0a2dcfb5eb
parent1f95555c69219180f792ac742cc0e386496c29e6 (diff)
downloadframeworks_av-5432aea4b1b107b722ddb507c610bdfc4c61c8aa.zip
frameworks_av-5432aea4b1b107b722ddb507c610bdfc4c61c8aa.tar.gz
frameworks_av-5432aea4b1b107b722ddb507c610bdfc4c61c8aa.tar.bz2
Avoid jumps to faulty position after seeks
When seeking multiple times it is possible that some seeks are discarded in AwesomePlayer, which causes unwanted jumps to faulty positions. The reason is that a seek flag is reset twice in AwesomePlayer. At first when the video seek is completed and then again when the audio seek is completed. If a new seek is made after the previous video seek completed but before the previous audio seek completed, the new seek position is discarded by the previous audio seek completion. This fix makes sure that the seek flag is reset only when video has completed the seek. Change-Id: I8f8741d4cb8682345f1d1855bbad57c05f4e3c8d
-rw-r--r--media/libstagefright/AwesomePlayer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 130207d..aae6800 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -2096,7 +2096,10 @@ void AwesomePlayer::onCheckAudioStatus() {
mSeekNotificationSent = true;
}
- mSeeking = NO_SEEK;
+ if (mVideoSource == NULL) {
+ // For video the mSeeking flag is always reset in finishSeekIfNecessary
+ mSeeking = NO_SEEK;
+ }
notifyIfMediaStarted_l();
}