Commit 6faf5663 by olly Committed by Oliver Woodman

Fix NullPointerException enabling WebVtt subtitles in DASH

Issue: #2596

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151013802
parent 14f1b33f
......@@ -179,15 +179,15 @@ public class DefaultDashChunkSource implements DashChunkSource {
RepresentationHolder representationHolder =
representationHolders[trackSelection.getSelectedIndex()];
Representation selectedRepresentation = representationHolder.representation;
DashSegmentIndex segmentIndex = representationHolder.segmentIndex;
if (representationHolder.extractorWrapper != null) {
Representation selectedRepresentation = representationHolder.representation;
RangedUri pendingInitializationUri = null;
RangedUri pendingIndexUri = null;
if (representationHolder.extractorWrapper.getSampleFormats() == null) {
pendingInitializationUri = selectedRepresentation.getInitializationUri();
}
if (segmentIndex == null) {
if (representationHolder.segmentIndex == null) {
pendingIndexUri = selectedRepresentation.getIndexUri();
}
if (pendingInitializationUri != null || pendingIndexUri != null) {
......@@ -197,6 +197,7 @@ public class DefaultDashChunkSource implements DashChunkSource {
trackSelection.getSelectionData(), pendingInitializationUri, pendingIndexUri);
return;
}
}
long nowUs = getNowUnixTimeUs();
int availableSegmentCount = representationHolder.getSegmentCount();
......
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