first segment's duration is probed to exclude it if needed
This commit is contained in:
@@ -125,7 +125,7 @@ public class StreamActionsService {
|
||||
}
|
||||
}
|
||||
|
||||
public List<Path> getSegmentsInRange(Path streamDirectory, Instant startTime, Instant endTime) throws IOException {
|
||||
private List<Path> getSegmentsInRange(Path streamDirectory, Instant startTime, Instant endTime) throws IOException {
|
||||
long startMs = startTime.toEpochMilli();
|
||||
long endMs = endTime.toEpochMilli();
|
||||
|
||||
@@ -189,7 +189,7 @@ public class StreamActionsService {
|
||||
long firstMs = parseTimestampMs(segments.getFirst());
|
||||
float trimOffset = Math.max(0f, (startTime.toEpochMilli() - firstMs) / 1000f);
|
||||
|
||||
// if the first segment is longer than the trim-offset, then ggs
|
||||
// if the first segment is longer than the trim-offset
|
||||
if (trimOffset > 0 && probeDurationSeconds(segments.getFirst()) < trimOffset) {
|
||||
segments.removeFirst();
|
||||
if (segments.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user