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

Commit fe9b7191 authored by Andreas Huber's avatar Andreas Huber
Browse files

After a seek there's a brief period where audio time isn't reestablished.

Don't use audio time to trigger a "we're very late, skipping ahead" action
until it's reestablished.

Change-Id: Ia8534e5bed60203d49a457d14b2e55eb972b5fa1
related-to-bug: 4173683
parent 75ae0de8
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -405,6 +405,10 @@ int64_t AudioPlayer::getMediaTimeUs() {
    Mutex::Autolock autoLock(mLock);

    if (mPositionTimeMediaUs < 0 || mPositionTimeRealUs < 0) {
        if (mSeeking) {
            return mSeekTimeUs;
        }

        return 0;
    }

@@ -430,6 +434,7 @@ status_t AudioPlayer::seekTo(int64_t time_us) {
    Mutex::Autolock autoLock(mLock);

    mSeeking = true;
    mPositionTimeRealUs = mPositionTimeMediaUs = -1;
    mReachedEOS = false;
    mSeekTimeUs = time_us;