Commit 26e13066 by olly Committed by Oliver Woodman

Fix HLS Timeline.isDynamic

- Also fix an issue that allowed blacklisting of all tracks,
due to incorrect index being used.
- Also fix an issue with track deselection for HLS.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132882151
parent 2da35769
......@@ -163,7 +163,8 @@ import java.util.List;
mayRetainStreamFlags, childStreams, streamResetFlags, !seenFirstTrackSelection);
boolean wrapperEnabled = false;
for (int j = 0; j < selections.length; j++) {
if (selectionChildIndices[j] == i) {
if (selectionChildIndices[j] == i
|| (selectionChildIndices[j] == C.INDEX_UNSET && streamChildIndices[j] == i)) {
streams[j] = childStreams[j];
if (childStreams[j] != null) {
wrapperEnabled = true;
......@@ -291,7 +292,7 @@ import java.util.List;
callback.onPrepared(this);
// TODO[playlists]: Calculate the window.
Timeline timeline = new SinglePeriodTimeline(durationUs, !isLive);
Timeline timeline = new SinglePeriodTimeline(durationUs, durationUs, 0, 0, !isLive, isLive);
sourceListener.onSourceInfoRefreshed(timeline, playlist);
}
......
......@@ -138,7 +138,7 @@ public abstract class BaseTrackSelection implements TrackSelection {
long nowMs = SystemClock.elapsedRealtime();
boolean canBlacklist = isBlacklisted(index, nowMs);
for (int i = 0; i < length && !canBlacklist; i++) {
canBlacklist = i != index && !isBlacklisted(index, nowMs);
canBlacklist = i != index && !isBlacklisted(i, nowMs);
}
if (!canBlacklist) {
return false;
......
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