For HLS segment sniffing, fall back on extractor creation by file extension

This reduces the possiblity of regressions.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213436912
This commit is contained in:
aquilescanta 2018-09-18 06:02:22 -07:00 committed by Oliver Woodman
parent e25b7d2148
commit a89645d092

View File

@ -28,7 +28,6 @@ import com.google.android.exoplayer2.extractor.ts.Ac3Extractor;
import com.google.android.exoplayer2.extractor.ts.AdtsExtractor;
import com.google.android.exoplayer2.extractor.ts.DefaultTsPayloadReaderFactory;
import com.google.android.exoplayer2.extractor.ts.TsExtractor;
import com.google.android.exoplayer2.source.UnrecognizedInputFormatException;
import com.google.android.exoplayer2.util.MimeTypes;
import com.google.android.exoplayer2.util.TimestampAdjuster;
import java.io.EOFException;
@ -145,8 +144,8 @@ public final class DefaultHlsExtractorFactory implements HlsExtractorFactory {
}
}
throw new UnrecognizedInputFormatException(
"The segment does not seem to conform to any of the known HLS segment formats", uri);
// Fall back on the extractor created by file extension.
return buildResult(extractorByFileExtension);
}
private Extractor createExtractorByFileExtension(