From b55a80dbf99b519a0b75dd83d95d13da12242543 Mon Sep 17 00:00:00 2001 From: Oliver Woodman Date: Tue, 1 Sep 2015 14:12:22 +0100 Subject: [PATCH] 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. --- .../java/com/google/android/exoplayer/dash/DashChunkSource.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/java/com/google/android/exoplayer/dash/DashChunkSource.java b/library/src/main/java/com/google/android/exoplayer/dash/DashChunkSource.java index a246a7e8e7..c9dcc78afb 100644 --- a/library/src/main/java/com/google/android/exoplayer/dash/DashChunkSource.java +++ b/library/src/main/java/com/google/android/exoplayer/dash/DashChunkSource.java @@ -422,9 +422,9 @@ public class DashChunkSource implements ChunkSource { seekPositionUs = Math.max(availableRangeValues[0], availableRangeValues[1] - liveEdgeLatencyUs); } else { - seekPositionUs = Math.max(seekPositionUs, availableRangeValues[0]); // we subtract 1 from the upper bound because it's exclusive for that bound seekPositionUs = Math.min(seekPositionUs, availableRangeValues[1] - 1); + seekPositionUs = Math.max(seekPositionUs, availableRangeValues[0]); } }