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

Commit ac04156e authored by Praveen Chavan's avatar Praveen Chavan
Browse files

NuPlayerRenderer: Update position of AV stream even after audio EOS

For AV streams with shorter audio, anchorTime does not update beyond
audio EOS causing MediaPlayer.getCurrentPosition to return the same
fixed value (progress bar does not update).
Allow updating the current position in renderer beyond the anchorTime
to update the player's position if audio stream is present.

CRs-Fixed: 808073

Change-Id: I75625d24a6c155ff12f27fd0848503657e9219aa
parent 93c7af79
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -242,7 +242,7 @@ status_t NuPlayer::Renderer::getCurrentPositionFromAnchor(

    // limit position to the last queued media time (for video only stream
    // position will be discrete as we don't know how long each frame lasts)
    if (mAnchorMaxMediaUs >= 0 && !allowPastQueuedVideo) {
    if (!mHasAudio && mAnchorMaxMediaUs >= 0 && !allowPastQueuedVideo) {
        if (positionUs > mAnchorMaxMediaUs) {
            positionUs = mAnchorMaxMediaUs;
        }