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

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

am b19da8e1: Fix for 2581725. Keep the last frame after resume(), and delete...

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.

Merge commit 'b19da8e1' into froyo-plus-aosp

* commit 'b19da8e1':
  Fix for 2581725. Keep the last frame after resume(), and delete it
parents de3601e0 b19da8e1
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -1239,7 +1239,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) {
@@ -1344,7 +1356,7 @@ status_t AwesomePlayer::resume() {
        play_l();
    }

    delete state;
    mSuspensionState = state;
    state = NULL;

    return OK;