No-op cleanup of DashTimeline
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=204451894
This commit is contained in:
parent
18ab4b9112
commit
cba6da8906
@ -1083,10 +1083,9 @@ public final class DashMediaSource extends BaseMediaSource {
|
||||
|
||||
@Override
|
||||
public Period getPeriod(int periodIndex, Period period, boolean setIdentifiers) {
|
||||
Assertions.checkIndex(periodIndex, 0, manifest.getPeriodCount());
|
||||
Assertions.checkIndex(periodIndex, 0, getPeriodCount());
|
||||
Object id = setIdentifiers ? manifest.getPeriod(periodIndex).id : null;
|
||||
Object uid = setIdentifiers ? firstPeriodId
|
||||
+ Assertions.checkIndex(periodIndex, 0, manifest.getPeriodCount()) : null;
|
||||
Object uid = setIdentifiers ? (firstPeriodId + periodIndex) : null;
|
||||
return period.set(id, uid, 0, manifest.getPeriodDurationUs(periodIndex),
|
||||
C.msToUs(manifest.getPeriod(periodIndex).startMs - manifest.getPeriod(0).startMs)
|
||||
- offsetInFirstPeriodUs);
|
||||
@ -1113,7 +1112,7 @@ public final class DashMediaSource extends BaseMediaSource {
|
||||
windowDefaultStartPositionUs,
|
||||
windowDurationUs,
|
||||
/* firstPeriodIndex= */ 0,
|
||||
manifest.getPeriodCount() - 1,
|
||||
/* lastPeriodIndex= */ getPeriodCount() - 1,
|
||||
offsetInFirstPeriodUs);
|
||||
}
|
||||
|
||||
@ -1123,8 +1122,8 @@ public final class DashMediaSource extends BaseMediaSource {
|
||||
return C.INDEX_UNSET;
|
||||
}
|
||||
int periodId = (int) uid;
|
||||
return periodId < firstPeriodId || periodId >= firstPeriodId + getPeriodCount()
|
||||
? C.INDEX_UNSET : (periodId - firstPeriodId);
|
||||
int periodIndex = periodId - firstPeriodId;
|
||||
return periodIndex < 0 || periodIndex >= getPeriodCount() ? C.INDEX_UNSET : periodIndex;
|
||||
}
|
||||
|
||||
private long getAdjustedWindowDefaultStartPositionUs(long defaultPositionProjectionUs) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user