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

Commit ce2bb8f9 authored by Wei Jia's avatar Wei Jia Committed by android-build-merger
Browse files

Merge "NuPlayer: ignore stale message for teardown." into nyc-dev

am: 8986b4d5

* commit '8986b4d5':
  NuPlayer: ignore stale message for teardown.

Change-Id: Id539b8b717f809d2a99104259311e52a9858aea2
parents 9d617698 8986b4d5
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1151,6 +1151,11 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
                int32_t reason;
                CHECK(msg->findInt32("reason", &reason));
                ALOGV("Tear down audio with reason %d.", reason);
                if (reason == Renderer::kDueToTimeout && !(mPaused && mOffloadAudio)) {
                    // TimeoutWhenPaused is only for offload mode.
                    ALOGW("Receive a stale message for teardown.");
                    break;
                }
                int64_t positionUs;
                if (!msg->findInt64("positionUs", &positionUs)) {
                    positionUs = mPreviousSeekTimeUs;