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

Commit f108dc85 authored by Ronghua Wu's avatar Ronghua Wu Committed by android-build-merger
Browse files

am 7966142a: Merge "NuPlayer: invalid anchor time when render is flushed." into lmp-mr1-dev

automerge: 2a424d6f

* commit '2a424d6f':
  NuPlayer: invalid anchor time when render is flushed.
parents 9f77da10 2a424d6f
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -310,6 +310,13 @@ status_t NuPlayerDriver::stop() {
}

status_t NuPlayerDriver::pause() {
    // The NuPlayerRenderer may get flushed if pause for long enough, e.g. the pause timeout tear
    // down for audio offload mode. If that happens, the NuPlayerRenderer will no longer know the
    // current position. So similar to seekTo, update |mPositionUs| to the pause position by calling
    // getCurrentPosition here.
    int msec;
    getCurrentPosition(&msec);

    Mutex::Autolock autoLock(mLock);

    switch (mState) {
+1 −0
Original line number Diff line number Diff line
@@ -1039,6 +1039,7 @@ void NuPlayer::Renderer::onFlush(const sp<AMessage> &msg) {
         Mutex::Autolock autoLock(mLock);
         syncQueuesDone_l();
         setPauseStartedTimeRealUs(-1);
         setAnchorTime(-1, -1);
    }

    ALOGV("flushing %s", audio ? "audio" : "video");