DASH: Ignore stream defined index if manifest defines one.

Issue: #1287
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117225449
This commit is contained in:
olly 2016-03-15 04:23:54 -07:00 committed by Oliver Woodman
parent ae2e858978
commit 9b467b7c1b

View file

@ -463,12 +463,14 @@ public class DashChunkSource implements ChunkSource {
if (initializationChunk.hasSampleFormat()) {
representationHolder.sampleFormat = initializationChunk.getSampleFormat();
}
if (initializationChunk.hasSeekMap()) {
// The null check avoids overwriting an index obtained from the manifest with one obtained
// from the stream. If the manifest defines an index then the stream shouldn't, but in cases
// where it does we should ignore it.
if (representationHolder.segmentIndex == null && initializationChunk.hasSeekMap()) {
representationHolder.segmentIndex = new DashWrappingSegmentIndex(
(ChunkIndex) initializationChunk.getSeekMap(),
initializationChunk.dataSpec.uri.toString());
}
// The null check avoids overwriting drmInitData obtained from the manifest with drmInitData
// obtained from the stream, as per DASH IF Interoperability Recommendations V3.0, 7.5.3.
if (periodHolder.drmInitData == null && initializationChunk.hasDrmInitData()) {