mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Discard trailing ctts entries with 0 sample counts
The bug this cl fixes is basically an uncaught case of [] Issue: #1567 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=123963779
This commit is contained in:
parent
443a656ada
commit
105ef1da2d
1 changed files with 8 additions and 1 deletions
|
|
@ -229,12 +229,19 @@ import java.util.List;
|
||||||
remainingSamplesInChunk--;
|
remainingSamplesInChunk--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Assertions.checkArgument(remainingSamplesAtTimestampOffset == 0);
|
||||||
|
// Remove trailing ctts entries with 0-valued sample counts.
|
||||||
|
while (remainingTimestampOffsetChanges > 0) {
|
||||||
|
Assertions.checkArgument(ctts.readUnsignedIntToInt() == 0);
|
||||||
|
ctts.readInt(); // Ignore offset.
|
||||||
|
remainingTimestampOffsetChanges--;
|
||||||
|
}
|
||||||
|
|
||||||
// Check all the expected samples have been seen.
|
// Check all the expected samples have been seen.
|
||||||
Assertions.checkArgument(remainingSynchronizationSamples == 0);
|
Assertions.checkArgument(remainingSynchronizationSamples == 0);
|
||||||
Assertions.checkArgument(remainingSamplesAtTimestampDelta == 0);
|
Assertions.checkArgument(remainingSamplesAtTimestampDelta == 0);
|
||||||
Assertions.checkArgument(remainingSamplesInChunk == 0);
|
Assertions.checkArgument(remainingSamplesInChunk == 0);
|
||||||
Assertions.checkArgument(remainingTimestampDeltaChanges == 0);
|
Assertions.checkArgument(remainingTimestampDeltaChanges == 0);
|
||||||
Assertions.checkArgument(remainingTimestampOffsetChanges == 0);
|
|
||||||
} else {
|
} else {
|
||||||
long[] chunkOffsetsBytes = new long[chunkIterator.length];
|
long[] chunkOffsetsBytes = new long[chunkIterator.length];
|
||||||
int[] chunkSampleCounts = new int[chunkIterator.length];
|
int[] chunkSampleCounts = new int[chunkIterator.length];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue