mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08: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
@ -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…
x
Reference in New Issue
Block a user