Fix the build.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117234408
This commit is contained in:
olly 2016-03-15 06:47:35 -07:00 committed by Oliver Woodman
parent 7208819018
commit 9d5aa0f983
2 changed files with 5 additions and 2 deletions

View File

@ -105,6 +105,7 @@ public final class FragmentedMp4Extractor implements Extractor {
private ParsableByteArray atomData; private ParsableByteArray atomData;
private long endOfMdatPosition; private long endOfMdatPosition;
private long durationUs;
private TrackBundle currentTrackBundle; private TrackBundle currentTrackBundle;
private int sampleSize; private int sampleSize;
private int sampleBytesWritten; private int sampleBytesWritten;
@ -230,7 +231,7 @@ public final class FragmentedMp4Extractor implements Extractor {
currentTrackBundle = null; currentTrackBundle = null;
endOfMdatPosition = atomPosition + atomSize; endOfMdatPosition = atomPosition + atomSize;
if (!haveOutputSeekMap) { if (!haveOutputSeekMap) {
extractorOutput.seekMap(new SeekMap.Unseekable(C.UNKNOWN_TIME_US)); extractorOutput.seekMap(new SeekMap.Unseekable(durationUs));
haveOutputSeekMap = true; haveOutputSeekMap = true;
} }
parserState = STATE_READING_ENCRYPTION_DATA; parserState = STATE_READING_ENCRYPTION_DATA;
@ -336,6 +337,7 @@ public final class FragmentedMp4Extractor implements Extractor {
} }
// Construction of Tracks and TrackOutputs. // Construction of Tracks and TrackOutputs.
durationUs = C.UNKNOWN_TIME_US;
trackBundles.clear(); trackBundles.clear();
int moovContainerChildrenSize = moov.containerChildren.size(); int moovContainerChildrenSize = moov.containerChildren.size();
int trackBundlesSize = 0; int trackBundlesSize = 0;
@ -349,6 +351,7 @@ public final class FragmentedMp4Extractor implements Extractor {
extractorOutput.track(trackBundlesSize++), defaultSampleValues); extractorOutput.track(trackBundlesSize++), defaultSampleValues);
bundle.output.format(track.format); bundle.output.format(track.format);
trackBundles.put(track.id, bundle); trackBundles.put(track.id, bundle);
durationUs = Math.max(track.durationUs, durationUs);
} }
} }
} }

View File

@ -997,7 +997,7 @@ public final class WebmExtractor implements Extractor {
durationsUs[cuePointsSize - 1] = durationUs - timesUs[cuePointsSize - 1]; durationsUs[cuePointsSize - 1] = durationUs - timesUs[cuePointsSize - 1];
cueTimesUs = null; cueTimesUs = null;
cueClusterPositions = null; cueClusterPositions = null;
return new ChunkIndex(durationUs, sizes, offsets, durationsUs, timesUs); return new ChunkIndex(sizes, offsets, durationsUs, timesUs);
} }
/** /**