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

Commit e2693174 authored by Gloria Wang's avatar Gloria Wang Committed by Android Git Automerger
Browse files

am ce387505: am 465934d1: am d4c072d3: am b19da8e1: Fix for 2581725. Keep the...

am ce387505: am 465934d1: am d4c072d3: am b19da8e1: Fix for 2581725. Keep the last frame after resume(), and delete it in the next suspend() or reuse it if no new frame is available.
parents 57e6f58b ce387505
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -1237,7 +1237,19 @@ status_t AwesomePlayer::suspend() {
    Mutex::Autolock autoLock(mLock);

    if (mSuspensionState != NULL) {
        return INVALID_OPERATION;
        if (mLastVideoBuffer == NULL) {
            //go into here if video is suspended again
            //after resuming without being played between
            //them
            SuspensionState *state = mSuspensionState;
            mSuspensionState = NULL;
            reset_l();
            mSuspensionState = state;
            return OK;
        }

        delete mSuspensionState;
        mSuspensionState = NULL;
    }

    if (mFlags & PREPARING) {
@@ -1342,7 +1354,7 @@ status_t AwesomePlayer::resume() {
        play_l();
    }

    delete state;
    mSuspensionState = state;
    state = NULL;

    return OK;