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

Commit d76d9e0a authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Add INT64_MIN check in MPEG4Writer sample validate" into main

parents 8a1ab3f4 bf62345a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2454,6 +2454,11 @@ bool MPEG4Writer::Track::isTimestampValid(int64_t timeUs) {
        return true;
    }

    // Make sure abs(timeUs) does not overflow
    if (timeUs == INT64_MIN) {
       return false;
    }

    // Ensure that the timeUs value does not have extremely low or high values
    // that would cause an underflow or overflow, like in the calculation -
    // mdhdDuration = (trakDurationUs * mTimeScale + 5E5) / 1E6