diff --git a/library/src/main/java/com/google/android/exoplayer2/source/dash/DashWrappingSegmentIndex.java b/library/src/main/java/com/google/android/exoplayer2/source/dash/DashWrappingSegmentIndex.java index 9e48bc2c79..56ea626120 100644 --- a/library/src/main/java/com/google/android/exoplayer2/source/dash/DashWrappingSegmentIndex.java +++ b/library/src/main/java/com/google/android/exoplayer2/source/dash/DashWrappingSegmentIndex.java @@ -28,9 +28,8 @@ import com.google.android.exoplayer2.source.dash.manifest.RangedUri; /** * @param chunkIndex The {@link ChunkIndex} to wrap. - * @param uri The URI where the data is located. */ - public DashWrappingSegmentIndex(ChunkIndex chunkIndex, String uri) { + public DashWrappingSegmentIndex(ChunkIndex chunkIndex) { this.chunkIndex = chunkIndex; } diff --git a/library/src/main/java/com/google/android/exoplayer2/source/dash/DefaultDashChunkSource.java b/library/src/main/java/com/google/android/exoplayer2/source/dash/DefaultDashChunkSource.java index 0e3d127796..74d53d3e32 100644 --- a/library/src/main/java/com/google/android/exoplayer2/source/dash/DefaultDashChunkSource.java +++ b/library/src/main/java/com/google/android/exoplayer2/source/dash/DefaultDashChunkSource.java @@ -185,10 +185,9 @@ public class DefaultDashChunkSource implements DashChunkSource { } if (pendingInitializationUri != null || pendingIndexUri != null) { // We have initialization and/or index requests to make. - Chunk initializationChunk = newInitializationChunk(representationHolder, dataSource, + out.chunk = newInitializationChunk(representationHolder, dataSource, trackSelection.getSelectedFormat(), trackSelection.getSelectionReason(), trackSelection.getSelectionData(), pendingInitializationUri, pendingIndexUri); - out.chunk = initializationChunk; return; } @@ -233,10 +232,9 @@ public class DefaultDashChunkSource implements DashChunkSource { } int maxSegmentCount = Math.min(maxSegmentsPerLoad, lastAvailableSegmentNum - segmentNum + 1); - Chunk nextMediaChunk = newMediaChunk(representationHolder, dataSource, - trackSelection.getSelectedFormat(), trackSelection.getSelectionReason(), - trackSelection.getSelectionData(), sampleFormat, segmentNum, maxSegmentCount); - out.chunk = nextMediaChunk; + out.chunk = newMediaChunk(representationHolder, dataSource, trackSelection.getSelectedFormat(), + trackSelection.getSelectionReason(), trackSelection.getSelectionData(), sampleFormat, + segmentNum, maxSegmentCount); } @Override @@ -255,8 +253,7 @@ public class DefaultDashChunkSource implements DashChunkSource { if (representationHolder.segmentIndex == null) { SeekMap seekMap = initializationChunk.getSeekMap(); if (seekMap != null) { - representationHolder.segmentIndex = new DashWrappingSegmentIndex((ChunkIndex) seekMap, - initializationChunk.dataSpec.uri.toString()); + representationHolder.segmentIndex = new DashWrappingSegmentIndex((ChunkIndex) seekMap); } } }