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

Commit a9292fe1 authored by Robert Shih's avatar Robert Shih
Browse files

MPEG4Writer: initialize track start time

Bug: 62914344
Test: adb shell monkey -p com.google.android.GoogleCamera \
  -c android.intent.category.LAUNCHER \
  --ignore-security-exceptions \
  --monitor-native-crashes -s 389 -v -v -v 125000

Change-Id: Iea06969b47dd07a212018faadefad04b3f95719e
parent f0ba75d5
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;
    }