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

Commit ce35c5f2 authored by Xavier Varricatt's avatar Xavier Varricatt Committed by Linux Build Service Account
Browse files

nuplayer: Fix incorrect audio resume time during seek

GenericSource uses the timestamp of last video buffer
read in readBuffer() to seek audio, due to which audio
starts at a later position leading to frame drops.

Add change to use the first video sample timestamp
to seek audio

CRs-Fixed: 780094
Change-Id: I5f2061e67994a3a0330b527bd3164ee04ed04005
parent 6dff4983
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1521,7 +1521,8 @@ void NuPlayer::GenericSource::readBuffer(
            queueDiscontinuityIfNeeded(seeking, formatChange, trackType, track);

            sp<ABuffer> buffer = mediaBufferToABuffer(
                    mbuf, trackType, seekTimeUs, actualTimeUs);
                    mbuf, trackType, seekTimeUs,
                    numBuffers == 0 ? actualTimeUs : NULL);
            track->mPackets->queueAccessUnit(buffer);
            formatChange = false;
            seeking = false;