diff options
| author | 2010-04-07 10:24:35 -0700 | |
|---|---|---|
| committer | 2010-04-07 10:35:18 -0700 | |
| commit | ddb709c45e6b1a2127db7f34f6a4f1c09402d76b (patch) | |
| tree | 581038b3b3277940f2012dc45862850321982e54 | |
| parent | f61eade258d5274b8447c0ea936ee578b7dc063a (diff) | |
Report the requested seek time while seek is in progress.
Change-Id: I862bfb801701f9ce54dede51c492e4eb37591894
related-to-bug: 2576102
| -rw-r--r-- | media/libstagefright/AwesomePlayer.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index 27add0a62ae7..e7022f4b3ade 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -668,7 +668,9 @@ status_t AwesomePlayer::getDuration(int64_t *durationUs) { } status_t AwesomePlayer::getPosition(int64_t *positionUs) { - if (mVideoSource != NULL) { + if (mSeeking) { + *positionUs = mSeekTimeUs; + } else if (mVideoSource != NULL) { Mutex::Autolock autoLock(mMiscStateLock); *positionUs = mVideoTimeUs; } else if (mAudioPlayer != NULL) { @@ -710,7 +712,6 @@ void AwesomePlayer::seekAudioIfNecessary_l() { mWatchForAudioSeekComplete = true; mWatchForAudioEOS = true; - mSeeking = false; mSeekNotificationSent = false; } } @@ -1001,6 +1002,8 @@ void AwesomePlayer::onCheckAudioStatus() { notifyListener_l(MEDIA_SEEK_COMPLETE); mSeekNotificationSent = true; } + + mSeeking = false; } status_t finalStatus; |