summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Jia <wjia@google.com>2014-09-10 10:06:11 -0700
committerThe Android Automerger <android-build@google.com>2014-09-10 16:57:44 -0700
commit666c8011c7ea96436b40912d94e6d6097dcfdaf6 (patch)
tree8385e6354e248f365ac74eb6437e0c6a2d5c69bc
parent5fc863a507d3e1171158e0d16ff0174fadf0ec04 (diff)
downloadframeworks_av-666c8011c7ea96436b40912d94e6d6097dcfdaf6.zip
frameworks_av-666c8011c7ea96436b40912d94e6d6097dcfdaf6.tar.gz
frameworks_av-666c8011c7ea96436b40912d94e6d6097dcfdaf6.tar.bz2
NuPlayerDriver: do not set to paused state when receiving playback complete and reset is in progress.
Bug: 17453240 Change-Id: If243e2232779681fc84dc767feaed00f23d8fdb1
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp b/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp
index 35cd514..7dd54c1 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp
@@ -626,12 +626,15 @@ void NuPlayerDriver::notifyListener_l(
switch (msg) {
case MEDIA_PLAYBACK_COMPLETE:
{
- if (mLooping && mState != STATE_RESET_IN_PROGRESS) {
- mPlayer->seekToAsync(0);
- break;
+ if (mState != STATE_RESET_IN_PROGRESS) {
+ if (mLooping) {
+ mPlayer->seekToAsync(0);
+ break;
+ }
+
+ mPlayer->pause();
+ mState = STATE_PAUSED;
}
- mPlayer->pause();
- mState = STATE_PAUSED;
// fall through
}