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

Commit 1439ac2a authored by mtk08122's avatar mtk08122 Committed by Marco Nelissen
Browse files

Return first data packet when seek to begin

Problem: When play an ogg file and seek to begin, the packet
which send to vorbis decoder might be not integral and it
would cause noise issue.

Solution: Return first data packet when seek to begin.

Bug: 122921499
Test: Play ogg file and then seek to begin
Change-Id: Idb89913262ff21add86b1eae75f72a1e390632e9
parent 51364921
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -983,7 +983,7 @@ void MyOggExtractor::buildTableOfContents() {
        size_t denom = numerator - kMaxNumTOCEntries;

        size_t accum = 0;
        for (ssize_t i = mTableOfContents.size() - 1; i >= 0; --i) {
        for (ssize_t i = mTableOfContents.size(); i > 0; --i) {
            accum += denom;
            if (accum >= numerator) {
                mTableOfContents.removeAt(i);