mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Treat NO_VALUE as zero when adding up total required bitrate
We currently use the literal -1 (=NO_VALUE) when adding up the
total. Tracks without known bitrate can be ignored in the
calculation, but we should use an explicit value of 0.
#minor-release
Issue: google/ExoPlayer#10664
PiperOrigin-RevId: 480048126
(cherry picked from commit b0daae72cf)
This commit is contained in:
parent
48de6838b4
commit
166b201ae4
1 changed files with 2 additions and 1 deletions
|
|
@ -755,7 +755,8 @@ public class AdaptiveTrackSelection extends BaseTrackSelection {
|
|||
}
|
||||
trackBitrates[i] = new long[definition.tracks.length];
|
||||
for (int j = 0; j < definition.tracks.length; j++) {
|
||||
trackBitrates[i][j] = definition.group.getFormat(definition.tracks[j]).bitrate;
|
||||
long bitrate = definition.group.getFormat(definition.tracks[j]).bitrate;
|
||||
trackBitrates[i][j] = bitrate == Format.NO_VALUE ? 0 : bitrate;
|
||||
}
|
||||
Arrays.sort(trackBitrates[i]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue