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

Commit 3b52853d authored by Marco Nelissen's avatar Marco Nelissen Committed by Android Git Automerger
Browse files

am 9589b468: Merge "Fix harmless unsigned overflow in recoverPTS"

* commit '9589b468':
  Fix harmless unsigned overflow in recoverPTS
parents 977324b9 9589b468
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -509,7 +509,7 @@ int64_t ATSParser::Program::recoverPTS(uint64_t PTS_33bit) {
        mLastRecoveredPTS = static_cast<int64_t>(PTS_33bit);
    } else {
        mLastRecoveredPTS = static_cast<int64_t>(
                ((mLastRecoveredPTS - PTS_33bit + 0x100000000ll)
                ((mLastRecoveredPTS - static_cast<int64_t>(PTS_33bit) + 0x100000000ll)
                & 0xfffffffe00000000ull) | PTS_33bit);
        // We start from 0, but recovered PTS could be slightly below 0.
        // Clamp it to 0 as rest of the pipeline doesn't take negative pts.