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

Commit acaece56 authored by Robert Shih's avatar Robert Shih Committed by android-build-merger
Browse files

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

am: 22fd463e

Change-Id: If1fc94a3462179a647e943e00288c5b3c45ea867
parents e29056e9 22fd463e
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;
    }