Commit e3da2cfb by olly Committed by Oliver Woodman

Treat .vtt as Webvtt as well as .webvtt.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112161960
parent 949317a4
...@@ -115,7 +115,8 @@ public class HlsChunkSource implements HlsTrackSelector.Output { ...@@ -115,7 +115,8 @@ public class HlsChunkSource implements HlsTrackSelector.Output {
private static final String TAG = "HlsChunkSource"; private static final String TAG = "HlsChunkSource";
private static final String AAC_FILE_EXTENSION = ".aac"; private static final String AAC_FILE_EXTENSION = ".aac";
private static final String MP3_FILE_EXTENSION = ".mp3"; private static final String MP3_FILE_EXTENSION = ".mp3";
private static final String VTT_FILE_EXTENSION = ".webvtt"; private static final String VTT_FILE_EXTENSION = ".vtt";
private static final String WEBVTT_FILE_EXTENSION = ".webvtt";
private static final float BANDWIDTH_FRACTION = 0.8f; private static final float BANDWIDTH_FRACTION = 0.8f;
private final boolean isMaster; private final boolean isMaster;
...@@ -463,7 +464,8 @@ public class HlsChunkSource implements HlsTrackSelector.Output { ...@@ -463,7 +464,8 @@ public class HlsChunkSource implements HlsTrackSelector.Output {
Extractor extractor = new Mp3Extractor(startTimeUs); Extractor extractor = new Mp3Extractor(startTimeUs);
extractorWrapper = new HlsExtractorWrapper(trigger, format, startTimeUs, extractor, extractorWrapper = new HlsExtractorWrapper(trigger, format, startTimeUs, extractor,
switchingVariantSpliced, MediaFormat.NO_VALUE, MediaFormat.NO_VALUE); switchingVariantSpliced, MediaFormat.NO_VALUE, MediaFormat.NO_VALUE);
} else if (lastPathSegment.endsWith(VTT_FILE_EXTENSION)) { } else if (lastPathSegment.endsWith(WEBVTT_FILE_EXTENSION)
|| lastPathSegment.endsWith(VTT_FILE_EXTENSION)) {
PtsTimestampAdjuster timestampAdjuster = timestampAdjusterProvider.getAdjuster(isMaster, PtsTimestampAdjuster timestampAdjuster = timestampAdjusterProvider.getAdjuster(isMaster,
segment.discontinuitySequenceNumber, startTimeUs); segment.discontinuitySequenceNumber, startTimeUs);
if (timestampAdjuster == null) { if (timestampAdjuster == 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