mirror of
https://github.com/samsonjs/media.git
synced 2026-03-28 09:55:48 +00:00
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
This commit is contained in:
parent
d3f4da749c
commit
7c8a3d006d
1 changed files with 3 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue