diff options
author | Robert Shih <robertshih@google.com> | 2014-09-16 17:07:22 -0700 |
---|---|---|
committer | Robert Shih <robertshih@google.com> | 2014-09-16 17:09:49 -0700 |
commit | 6e9f6b498d758848fd934f8217c386dd74ef3833 (patch) | |
tree | 6c5f2b249a6fe243d73f825ea4ee2ed14a5d8be3 /media | |
parent | 086c1e3f41a92aa0025a1da1db5dabbfdffaf129 (diff) | |
download | frameworks_av-6e9f6b498d758848fd934f8217c386dd74ef3833.zip frameworks_av-6e9f6b498d758848fd934f8217c386dd74ef3833.tar.gz frameworks_av-6e9f6b498d758848fd934f8217c386dd74ef3833.tar.bz2 |
NuPlayerDriver: restart after eos pause
Bug: 17512187
Change-Id: I204ce83790bf98bc7ffebcb76d5df1e56a6a3f66
Diffstat (limited to 'media')
-rw-r--r-- | media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp b/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp index 7dd54c1..4e6b4d8 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp @@ -263,8 +263,15 @@ status_t NuPlayerDriver::start() { case STATE_PAUSED: case STATE_STOPPED_AND_PREPARED: { - mPlayer->resume(); - mPositionUs -= ALooper::GetNowUs() - mPauseStartedTimeUs; + if (mAtEOS) { + mPlayer->seekToAsync(0); + mAtEOS = false; + mPlayer->resume(); + mPositionUs = -1; + } else { + mPlayer->resume(); + mPositionUs -= ALooper::GetNowUs() - mPauseStartedTimeUs; + } break; } |