Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 465faa92 authored by Marco Nelissen's avatar Marco Nelissen
Browse files

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.
parent 16f6354b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -304,7 +304,7 @@ status_t MediaPlayer::pause()
{
{
    LOGV("pause");
    LOGV("pause");
    Mutex::Autolock _l(mLock);
    Mutex::Autolock _l(mLock);
    if (mCurrentState & MEDIA_PLAYER_PAUSED)
    if (mCurrentState & (MEDIA_PLAYER_PAUSED|MEDIA_PLAYER_PLAYBACK_COMPLETE))
        return NO_ERROR;
        return NO_ERROR;
    if ((mPlayer != 0) && (mCurrentState & MEDIA_PLAYER_STARTED)) {
    if ((mPlayer != 0) && (mCurrentState & MEDIA_PLAYER_STARTED)) {
        status_t ret = mPlayer->pause();
        status_t ret = mPlayer->pause();