mirror of
https://github.com/androidx/media.git
synced 2025-05-04 06:00:37 +08:00
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.
This commit is contained in:
parent
476cefa7cc
commit
b55a80dbf9
@ -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]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user