Bypass sniffing for single extractor
Sniffing is performed in ProgressiveMediaPeriod even if a single extractor is provided. Skip it in that case to improve performances. Issue:#6325 PiperOrigin-RevId: 266766373
This commit is contained in:
parent
fe422dbde4
commit
284a672bb3
@ -9,6 +9,8 @@
|
|||||||
* Reset `DefaultBandwidthMeter` to initial values on network change.
|
* Reset `DefaultBandwidthMeter` to initial values on network change.
|
||||||
* Increase maximum buffer size for video in `DefaultLoadControl` to ensure high
|
* Increase maximum buffer size for video in `DefaultLoadControl` to ensure high
|
||||||
quality video can be loaded up to the full default buffer duration.
|
quality video can be loaded up to the full default buffer duration.
|
||||||
|
* Bypass sniffing in `ProgressiveMediaPeriod` in case a single extractor is
|
||||||
|
provided ([#6325](https://github.com/google/ExoPlayer/issues/6325)).
|
||||||
* Fix audio selection issue where languages are compared by bit rate
|
* Fix audio selection issue where languages are compared by bit rate
|
||||||
([#6335](https://github.com/google/ExoPlayer/issues/6335)).
|
([#6335](https://github.com/google/ExoPlayer/issues/6335)).
|
||||||
* Add `HttpDataSource.getResponseCode` to provide the status code associated
|
* Add `HttpDataSource.getResponseCode` to provide the status code associated
|
||||||
|
@ -1042,6 +1042,9 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
|||||||
if (extractor != null) {
|
if (extractor != null) {
|
||||||
return extractor;
|
return extractor;
|
||||||
}
|
}
|
||||||
|
if (extractors.length == 1) {
|
||||||
|
this.extractor = extractors[0];
|
||||||
|
} else {
|
||||||
for (Extractor extractor : extractors) {
|
for (Extractor extractor : extractors) {
|
||||||
try {
|
try {
|
||||||
if (extractor.sniff(input)) {
|
if (extractor.sniff(input)) {
|
||||||
@ -1055,8 +1058,12 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (extractor == null) {
|
if (extractor == null) {
|
||||||
throw new UnrecognizedInputFormatException("None of the available extractors ("
|
throw new UnrecognizedInputFormatException(
|
||||||
+ Util.getCommaDelimitedSimpleClassNames(extractors) + ") could read the stream.", uri);
|
"None of the available extractors ("
|
||||||
|
+ Util.getCommaDelimitedSimpleClassNames(extractors)
|
||||||
|
+ ") could read the stream.",
|
||||||
|
uri);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
extractor.init(output);
|
extractor.init(output);
|
||||||
return extractor;
|
return extractor;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user