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

Commit 22fd463e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "MPEG4Writer: initialize track start time" into oc-dr1-dev

parents 66feec9f a9292fe1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1630,6 +1630,7 @@ MPEG4Writer::Track::Track(
      mCodecSpecificDataSize(0),
      mGotAllCodecSpecificData(false),
      mReachedEOS(false),
      mStartTimestampUs(-1),
      mRotation(0) {
    getCodecSpecificDataFromInputFormatIfPossible();

@@ -3650,7 +3651,7 @@ void MPEG4Writer::Track::writePaspBox() {
int64_t MPEG4Writer::Track::getStartTimeOffsetScaledTimeUs() const {
    int64_t trackStartTimeOffsetUs = 0;
    int64_t moovStartTimeUs = mOwner->getStartTimestampUs();
    if (mStartTimestampUs != moovStartTimeUs) {
    if (mStartTimestampUs != -1 && mStartTimestampUs != moovStartTimeUs) {
        CHECK_GT(mStartTimestampUs, moovStartTimeUs);
        trackStartTimeOffsetUs = mStartTimestampUs - moovStartTimeUs;
    }