Check the two Extractor instantiation sites in HLS remain consistent

PiperOrigin-RevId: 542585842
This commit is contained in:
ibaker 2023-06-22 16:41:35 +00:00 committed by Tofunmi Adigun-Hameed
parent ea0f564c1e
commit ca766b6979
2 changed files with 2 additions and 0 deletions

View File

@ -93,6 +93,7 @@ public final class BundledHlsMediaChunkExtractor implements HlsMediaChunkExtract
extractor.getUnderlyingImplementation() == extractor, extractor.getUnderlyingImplementation() == extractor,
"Can't recreate wrapped extractors. Outer type: " + extractor.getClass()); "Can't recreate wrapped extractors. Outer type: " + extractor.getClass());
Extractor newExtractorInstance; Extractor newExtractorInstance;
// LINT.IfChange(extractor_instantiation)
if (extractor instanceof WebvttExtractor) { if (extractor instanceof WebvttExtractor) {
newExtractorInstance = newExtractorInstance =
new WebvttExtractor(multivariantPlaylistFormat.language, timestampAdjuster); new WebvttExtractor(multivariantPlaylistFormat.language, timestampAdjuster);

View File

@ -159,6 +159,7 @@ public final class DefaultHlsExtractorFactory implements HlsExtractorFactory {
Format format, Format format,
@Nullable List<Format> muxedCaptionFormats, @Nullable List<Format> muxedCaptionFormats,
TimestampAdjuster timestampAdjuster) { TimestampAdjuster timestampAdjuster) {
// LINT.IfChange(extractor_instantiation)
switch (fileType) { switch (fileType) {
case FileTypes.WEBVTT: case FileTypes.WEBVTT:
return new WebvttExtractor(format.language, timestampAdjuster); return new WebvttExtractor(format.language, timestampAdjuster);