Commit fbd97ad8 by Steve Mayhew

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.
parent 4ad4a826
......@@ -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);
......
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