Commit 7c8a3d00 by aquilescanta Committed by Oliver Woodman

Flexibilize mp4 extensions detection for HLS chunks

This CL adds support  mp4 extensions of the form .m4_.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146479870
parent d3f4da74
......@@ -56,6 +56,7 @@ import java.util.concurrent.atomic.AtomicInteger;
private static final String EC3_FILE_EXTENSION = ".ec3";
private static final String MP3_FILE_EXTENSION = ".mp3";
private static final String MP4_FILE_EXTENSION = ".mp4";
private static final String M4_FILE_EXTENSION_PREFIX = ".m4";
private static final String VTT_FILE_EXTENSION = ".vtt";
private static final String WEBVTT_FILE_EXTENSION = ".webvtt";
......@@ -341,7 +342,8 @@ import java.util.concurrent.atomic.AtomicInteger;
// Only reuse TS and fMP4 extractors.
usingNewExtractor = false;
extractor = previousExtractor;
} else if (lastPathSegment.endsWith(MP4_FILE_EXTENSION)) {
} else if (lastPathSegment.endsWith(MP4_FILE_EXTENSION)
|| lastPathSegment.startsWith(M4_FILE_EXTENSION_PREFIX, lastPathSegment.length() - 4)) {
extractor = new FragmentedMp4Extractor(0, timestampAdjuster);
} else {
// MPEG-2 TS segments, but we need a new extractor.
......
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