if (_earliestTimestamp == null || currTstamp.isBefore(_earliestTimestamp)) {
_earliestTimestamp = currTstamp;
}
- if (_latestTimestamp == null || currTstamp.isAfter(_latestTimestamp)) {
- _latestTimestamp = currTstamp;
- }
// Work out duration without segment gaps
- if (!inPoint.getSegmentStart() && _prevPoint != null && _prevPoint.hasTimestamp())
+ if (!inPoint.getSegmentStart() && _latestTimestamp != null)
{
- long millisLater = currTstamp.getMillisecondsSince(_prevPoint.getTimestamp());
+ long millisLater = currTstamp.getMillisecondsSince(_latestTimestamp);
if (millisLater < 0) {
_timesOutOfSequence = true;
}
_movingMilliseconds += millisLater;
}
}
+ if (_latestTimestamp == null || currTstamp.isAfter(_latestTimestamp)) {
+ _latestTimestamp = currTstamp;
+ }
}
else {
_timesIncomplete = true;