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

Commit 8986b4d5 authored by Wei Jia's avatar Wei Jia Committed by Android (Google) Code Review
Browse files

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

parents bfb69e61 8456ddd1
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;