summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorGloria Wang <gwang@google.com>2011-08-18 14:52:36 -0700
committerGloria Wang <gwang@google.com>2011-08-18 14:52:36 -0700
commitaf64a8a6ad89f52685e822dca30742a4132c9ae6 (patch)
tree667302be03f9fb7a9fa08d9352847fc2ecdf1e23 /media
parentee0846f97cf07f5f18d19161526743330aabb44e (diff)
downloadframeworks_av-af64a8a6ad89f52685e822dca30742a4132c9ae6.zip
frameworks_av-af64a8a6ad89f52685e822dca30742a4132c9ae6.tar.gz
frameworks_av-af64a8a6ad89f52685e822dca30742a4132c9ae6.tar.bz2
When switching surface, do not set mSeekNotificationSent as true,
because there could be a previous uncompleted seeking which needs to send back MEDIA_SEEK_COMPLETE message. If we set mSeekNotificationSent as true here, then mediaplayer.cpp will be waiting for message MEDIA_SEEK_COMPLETE. The getCurrentPosition() will always return the seek time before MEDIA_SEEK_COMPLETE being received by mediaplayer.cpp. Fix for bug 5181272. Change-Id: I290aff29b6d9ec8db67c66abbe1f352a43f57073
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/AwesomePlayer.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 99242ab..96eecce 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -548,7 +548,7 @@ void AwesomePlayer::reset_l() {
mVideoTimeUs = 0;
mSeeking = NO_SEEK;
- mSeekNotificationSent = false;
+ mSeekNotificationSent = true;
mSeekTimeUs = 0;
mUri.setTo("");
@@ -1204,7 +1204,6 @@ void AwesomePlayer::setNativeWindow_l(const sp<ANativeWindow> &native) {
if (mLastVideoTimeUs >= 0) {
mSeeking = SEEK;
- mSeekNotificationSent = true;
mSeekTimeUs = mLastVideoTimeUs;
modifyFlags((AT_EOS | AUDIO_AT_EOS | VIDEO_AT_EOS), CLEAR);
}
@@ -1305,8 +1304,10 @@ void AwesomePlayer::OnRTSPSeekDoneWrapper(void *cookie) {
}
void AwesomePlayer::onRTSPSeekDone() {
- notifyListener_l(MEDIA_SEEK_COMPLETE);
- mSeekNotificationSent = true;
+ if (!mSeekNotificationSent) {
+ notifyListener_l(MEDIA_SEEK_COMPLETE);
+ mSeekNotificationSent = true;
+ }
}
status_t AwesomePlayer::seekTo_l(int64_t timeUs) {