Commit 264f1c90 by tonihei Committed by Oliver Woodman

Fix bug in FakeChunkSource.

In order to retrieve the data set, the track selection index was used, but
the data set is actually indexed by track group indices.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167566049
parent bec5e6e2
......@@ -92,7 +92,8 @@ public final class FakeChunkSource implements ChunkSource {
Format selectedFormat = trackSelection.getSelectedFormat();
long startTimeUs = dataSet.getStartTime(chunkIndex);
long endTimeUs = startTimeUs + dataSet.getChunkDuration(chunkIndex);
String uri = dataSet.getUri(trackSelection.getSelectedIndex());
int trackGroupIndex = trackSelection.getIndexInTrackGroup(trackSelection.getSelectedIndex());
String uri = dataSet.getUri(trackGroupIndex);
Segment fakeDataChunk = dataSet.getData(uri).getSegments().get(chunkIndex);
DataSpec dataSpec = new DataSpec(Uri.parse(uri), fakeDataChunk.byteOffset,
fakeDataChunk.length, null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment