Commit b55a80db by Oliver Woodman

Fixed potential issue in which a live-edge latency greater than the duration of…

Fixed potential issue in which a live-edge latency greater than the duration of the manifest would result in the latest available time being lower than the earliest available time.
parent 476cefa7
...@@ -422,9 +422,9 @@ public class DashChunkSource implements ChunkSource { ...@@ -422,9 +422,9 @@ public class DashChunkSource implements ChunkSource {
seekPositionUs = Math.max(availableRangeValues[0], seekPositionUs = Math.max(availableRangeValues[0],
availableRangeValues[1] - liveEdgeLatencyUs); availableRangeValues[1] - liveEdgeLatencyUs);
} else { } else {
seekPositionUs = Math.max(seekPositionUs, availableRangeValues[0]);
// we subtract 1 from the upper bound because it's exclusive for that bound // we subtract 1 from the upper bound because it's exclusive for that bound
seekPositionUs = Math.min(seekPositionUs, availableRangeValues[1] - 1); seekPositionUs = Math.min(seekPositionUs, availableRangeValues[1] - 1);
seekPositionUs = Math.max(seekPositionUs, availableRangeValues[0]);
} }
} }
......
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