Commit 38032a6e by Ian Baker Committed by Tianyi Feng

Merge pull request #436 from jaeho-lee104:feature/improve_condition

PiperOrigin-RevId: 540875285
(cherry picked from commit 9fd38c16eeb9e64ff62a0a47ae6e174bb8de8d43)
parent b16238a3
...@@ -461,7 +461,8 @@ public class AdaptiveTrackSelection extends BaseTrackSelection { ...@@ -461,7 +461,8 @@ public class AdaptiveTrackSelection extends BaseTrackSelection {
previousReason = Iterables.getLast(queue).trackSelectionReason; previousReason = Iterables.getLast(queue).trackSelectionReason;
} }
int newSelectedIndex = determineIdealSelectedIndex(nowMs, chunkDurationUs); int newSelectedIndex = determineIdealSelectedIndex(nowMs, chunkDurationUs);
if (!isTrackExcluded(previousSelectedIndex, nowMs)) { if (newSelectedIndex != previousSelectedIndex
&& !isTrackExcluded(previousSelectedIndex, nowMs)) {
// Revert back to the previous selection if conditions are not suitable for switching. // Revert back to the previous selection if conditions are not suitable for switching.
Format currentFormat = getFormat(previousSelectedIndex); Format currentFormat = getFormat(previousSelectedIndex);
Format selectedFormat = getFormat(newSelectedIndex); Format selectedFormat = getFormat(newSelectedIndex);
......
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