mirror of
https://github.com/samsonjs/media.git
synced 2026-04-16 13:05:46 +00:00
Default to not select iFrame oly tracks.
Pull in change to default to not use i-Frames for base AdaptiveTrackSelection. The expectation is a subclases, that support transitioning to iFrame, will select these tracks.
This commit is contained in:
parent
33667ebc8c
commit
64cd4383ad
1 changed files with 2 additions and 8 deletions
|
|
@ -541,16 +541,10 @@ public class AdaptiveTrackSelection extends BaseTrackSelection {
|
|||
protected boolean canSelectFormat(
|
||||
Format format, int trackBitrate, float playbackSpeed, long effectiveBitrate) {
|
||||
|
||||
boolean isIframeOnly = (format.roleFlags & C.ROLE_FLAG_TRICK_PLAY) != 0;
|
||||
boolean isNonIframeOnly = (format.roleFlags & C.ROLE_FLAG_TRICK_PLAY) == 0;
|
||||
boolean canSelect = Math.round(trackBitrate * playbackSpeed) <= effectiveBitrate;
|
||||
|
||||
if (Math.abs(playbackSpeed) > 6.0f) {
|
||||
canSelect = isIframeOnly; // TODO factor in playback speed...
|
||||
} else {
|
||||
canSelect = ! isIframeOnly && canSelect;
|
||||
}
|
||||
return canSelect;
|
||||
|
||||
return canSelect && isNonIframeOnly; // Default is not to use the IDR only tracks in selection
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue