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.
This commit is contained in:
Marco Nelissen
2010-02-26 13:16:23 -08:00
parent 16f6354be4
commit 465faa925d

View File

@@ -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();