mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +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
This commit is contained in:
parent
6f8863fc11
commit
b0daae72cf
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];
|
trackBitrates[i] = new long[definition.tracks.length];
|
||||||
for (int j = 0; j < definition.tracks.length; j++) {
|
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]);
|
Arrays.sort(trackBitrates[i]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue