Fixed wrong calculation of last segment number when using segment template without segment timeline.

This commit is contained in:
Ihor Zakhozhyi 2015-01-25 18:47:16 +02:00
parent 14d1317ce0
commit 1a363849e2

View file

@ -301,7 +301,7 @@ public abstract class SegmentBase {
return DashSegmentIndex.INDEX_UNBOUNDED;
} else {
long durationMs = (duration * 1000) / timescale;
return startNumber + (int) (periodDurationMs / durationMs);
return startNumber + (int) (periodDurationMs / durationMs) - 1;
}
}