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

Commit 6efd740d authored by Xavier Varricatt's avatar Xavier Varricatt Committed by Steve Kondik
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

Change-Id: I5f2061e67994a3a0330b527bd3164ee04ed04005
CRs-Fixed: 780094
parent 43e0c551
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1403,6 +1403,10 @@ void NuPlayer::GenericSource::readBuffer(
            formatChange = false;
            seeking = false;
            ++numBuffers;

            if (trackType == MEDIA_TRACK_TYPE_VIDEO) {
                actualTimeUs = NULL;
            }
        } else if (err == WOULD_BLOCK) {
            break;
        } else if (err == INFO_FORMAT_CHANGED) {