Handle stbl atoms with no samples.

Github issue: #554
This commit is contained in:
Oliver Woodman 2015-06-18 14:18:09 +01:00
parent 8c98c588e8
commit 072c63c33e

View File

@ -102,10 +102,13 @@ import java.util.List;
int fixedSampleSize = stsz.readUnsignedIntToInt(); int fixedSampleSize = stsz.readUnsignedIntToInt();
int sampleCount = stsz.readUnsignedIntToInt(); int sampleCount = stsz.readUnsignedIntToInt();
long[] offsets = new long[sampleCount];
int[] sizes = new int[sampleCount]; int[] sizes = new int[sampleCount];
long[] timestamps = new long[sampleCount]; long[] timestamps = new long[sampleCount];
long[] offsets = new long[sampleCount];
int[] flags = new int[sampleCount]; int[] flags = new int[sampleCount];
if (sampleCount == 0) {
return new TrackSampleTable(offsets, sizes, timestamps, flags);
}
// Prepare to read chunk offsets. // Prepare to read chunk offsets.
chunkOffsets.setPosition(Atom.FULL_HEADER_SIZE); chunkOffsets.setPosition(Atom.FULL_HEADER_SIZE);