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

Skip to content
Commit 3c573f7c authored by Guang Qiao's avatar Guang Qiao Committed by Gopalakrishnan Nallasamy
Browse files

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
parent 9f11c708
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment