mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Fix merge mistake, wrong track type.
Fix mistake from the backport merge, should get TEXT track type for subtitles. Also update testcase to match pattern in `dev-v2` branch.
This commit is contained in:
parent
4ad4a826ab
commit
fbd97ad8de
2 changed files with 2 additions and 2 deletions
|
|
@ -462,7 +462,7 @@ public final class HlsPlaylistParser implements ParsingLoadable.Parser<HlsPlayli
|
|||
variant = getVariantWithSubtitleGroup(variants, groupId);
|
||||
if (variant != null) {
|
||||
@Nullable
|
||||
String codecs = Util.getCodecsOfType(variant.format.codecs, C.TRACK_TYPE_AUDIO);
|
||||
String codecs = Util.getCodecsOfType(variant.format.codecs, C.TRACK_TYPE_TEXT);
|
||||
sampleMimeType = MimeTypes.getMediaMimeType(codecs);
|
||||
if (sampleMimeType == null) {
|
||||
sampleMimeType = MimeTypes.TEXT_VTT;
|
||||
|
|
|
|||
|
|
@ -364,7 +364,7 @@ public class HlsMasterPlaylistParserTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSubtitleCodec() throws IOException {
|
||||
public void parseMasterPlaylist_withMatchedTTMLSubtitleCodec() throws IOException {
|
||||
HlsMasterPlaylist playlistWithSubtitles =
|
||||
parseMasterPlaylist(PLAYLIST_URI, PLAYLIST_WITH_SUBTITLE_CODEC);
|
||||
HlsMasterPlaylist.Variant variant = playlistWithSubtitles.variants.get(0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue