mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
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
This commit is contained in:
parent
15bcdf3b71
commit
f88149385a
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user