Commit f8814938 by olly Committed by Oliver Woodman

Avoid rollover calculating sample offsets

I considered using Util.scaleLargeTimestamp for this, but
given sample offsets are relative and should always be
small (<<1s), it really shouldn't be necessary.

Issue: #3139

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164443795
parent 15bcdf3b
......@@ -815,7 +815,7 @@ public final class FragmentedMp4Extractor implements Extractor {
// here, because unsigned integers will still be parsed correctly (unless their top bit is
// set, which is never true in practice because sample offsets are always small).
int sampleOffset = trun.readInt();
sampleCompositionTimeOffsetTable[i] = (int) ((sampleOffset * 1000) / timescale);
sampleCompositionTimeOffsetTable[i] = (int) ((sampleOffset * 1000L) / timescale);
} else {
sampleCompositionTimeOffsetTable[i] = 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment