summaryrefslogtreecommitdiffstats
path: root/media/libmedia/mediaplayer.cpp
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2010-02-26 13:16:23 -0800
committerMarco Nelissen <marcone@google.com>2010-02-26 13:16:23 -0800
commit698f476590bc9e38d4d1d4155da9efdbedd357c4 (patch)
tree75bf577eb1f9cdc93b57b12befca37b01f44e032 /media/libmedia/mediaplayer.cpp
parent789c27a161f8ab7dba0835e015317ff4843c5cd2 (diff)
downloadframeworks_av-698f476590bc9e38d4d1d4155da9efdbedd357c4.zip
frameworks_av-698f476590bc9e38d4d1d4155da9efdbedd357c4.tar.gz
frameworks_av-698f476590bc9e38d4d1d4155da9efdbedd357c4.tar.bz2
When we're in the 'playback complete' state, don't consider pausing
an error. This makes 'playback complete' essentially equivalent to being paused at the end, and treats it the same as being paused at any other position.
Diffstat (limited to 'media/libmedia/mediaplayer.cpp')
-rw-r--r--media/libmedia/mediaplayer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp
index 2157814..d2cec0c 100644
--- a/media/libmedia/mediaplayer.cpp
+++ b/media/libmedia/mediaplayer.cpp
@@ -304,7 +304,7 @@ status_t MediaPlayer::pause()
{
LOGV("pause");
Mutex::Autolock _l(mLock);
- if (mCurrentState & MEDIA_PLAYER_PAUSED)
+ if (mCurrentState & (MEDIA_PLAYER_PAUSED|MEDIA_PLAYER_PLAYBACK_COMPLETE))
return NO_ERROR;
if ((mPlayer != 0) && (mCurrentState & MEDIA_PLAYER_STARTED)) {
status_t ret = mPlayer->pause();