Commit e5381811 by ojw28

Merge pull request #264 from IhorZak/dev

Fixed wrong calculation of last segment number when using segment templa...
parents 14d1317c 1a363849
...@@ -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