Commit a89645d0 by aquilescanta Committed by Oliver Woodman

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