mirror of
https://github.com/samsonjs/media.git
synced 2026-04-04 11:05:47 +00:00
Fix DefaultDashChunkSource.updateLiveEdgeTimeUs
Very subtle, but lastAvailableSegmentNum is shifted by RepresentationHolder.segmentNumShift. When accessing the index directly it's necessary to unshift. The easiest way to do this is to call through the holder, which does this for you. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=169239928
This commit is contained in:
parent
9bdf1ee944
commit
5b0e693419
1 changed files with 2 additions and 9 deletions
|
|
@ -317,15 +317,8 @@ public class DefaultDashChunkSource implements DashChunkSource {
|
|||
|
||||
private void updateLiveEdgeTimeUs(RepresentationHolder representationHolder,
|
||||
int lastAvailableSegmentNum) {
|
||||
if (manifest.dynamic) {
|
||||
DashSegmentIndex segmentIndex = representationHolder.representation.getIndex();
|
||||
long lastSegmentDurationUs = segmentIndex.getDurationUs(lastAvailableSegmentNum,
|
||||
manifest.getPeriodDurationUs(periodIndex));
|
||||
liveEdgeTimeUs = segmentIndex.getTimeUs(lastAvailableSegmentNum)
|
||||
+ lastSegmentDurationUs;
|
||||
} else {
|
||||
liveEdgeTimeUs = C.TIME_UNSET;
|
||||
}
|
||||
liveEdgeTimeUs = manifest.dynamic
|
||||
? representationHolder.getSegmentEndTimeUs(lastAvailableSegmentNum) : C.TIME_UNSET;
|
||||
}
|
||||
|
||||
private long getNowUnixTimeUs() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue