Loading
MPEG4Writer:RaceCondition updating mStartTimestampUs
Track1's execution of setting track1's mStartTimestampUs and setting MPEG4Writer's
mStartTimestampsUs may be interrupted by track2. If track2 was just running
exceedsFileDurationLimit() where all tracks would check if the track mStartTimestampUs was greater
than MPEG4Writer's mStartTimestampsUs, track1 would detect that its mStartTimestampUs is less than
MPEG4Writer's mStartTimestampUs which was set by track2 and that causes fatal error.
Current fix is to update MPEG4Writer's mStartTimeStampUs before updating track's
mStartTimeStampsUs so that we avoid getting into the scenario described above.
Bug: 123263577
Test: cts-tradefed run cts-dev -m CtsMediaTestCases --compatibility:module-arg
CtsMediaTestCases:include-annotation:android.platform.test.annotations.RequiresDevice
Change-Id: I3be78c92f756250f86fc8bd0c9ff84d95fe4d9e8