Commit 1a363849 by Ihor Zakhozhyi

Fixed wrong calculation of last segment number when using segment template…

Fixed wrong calculation of last segment number when using segment template without segment timeline.
parent 14d1317c
...@@ -301,7 +301,7 @@ public abstract class SegmentBase { ...@@ -301,7 +301,7 @@ public abstract class SegmentBase {
return DashSegmentIndex.INDEX_UNBOUNDED; return DashSegmentIndex.INDEX_UNBOUNDED;
} else { } else {
long durationMs = (duration * 1000) / timescale; long durationMs = (duration * 1000) / timescale;
return startNumber + (int) (periodDurationMs / durationMs); return startNumber + (int) (periodDurationMs / durationMs) - 1;
} }
} }
......
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