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
|
@Override
|
||||||
public Period getPeriod(int periodIndex, Period period, boolean setIdentifiers) {
|
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 id = setIdentifiers ? manifest.getPeriod(periodIndex).id : null;
|
||||||
Object uid = setIdentifiers ? firstPeriodId
|
Object uid = setIdentifiers ? (firstPeriodId + periodIndex) : null;
|
||||||
+ Assertions.checkIndex(periodIndex, 0, manifest.getPeriodCount()) : null;
|
|
||||||
return period.set(id, uid, 0, manifest.getPeriodDurationUs(periodIndex),
|
return period.set(id, uid, 0, manifest.getPeriodDurationUs(periodIndex),
|
||||||
C.msToUs(manifest.getPeriod(periodIndex).startMs - manifest.getPeriod(0).startMs)
|
C.msToUs(manifest.getPeriod(periodIndex).startMs - manifest.getPeriod(0).startMs)
|
||||||
- offsetInFirstPeriodUs);
|
- offsetInFirstPeriodUs);
|
||||||
@ -1113,7 +1112,7 @@ public final class DashMediaSource extends BaseMediaSource {
|
|||||||
windowDefaultStartPositionUs,
|
windowDefaultStartPositionUs,
|
||||||
windowDurationUs,
|
windowDurationUs,
|
||||||
/* firstPeriodIndex= */ 0,
|
/* firstPeriodIndex= */ 0,
|
||||||
manifest.getPeriodCount() - 1,
|
/* lastPeriodIndex= */ getPeriodCount() - 1,
|
||||||
offsetInFirstPeriodUs);
|
offsetInFirstPeriodUs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1123,8 +1122,8 @@ public final class DashMediaSource extends BaseMediaSource {
|
|||||||
return C.INDEX_UNSET;
|
return C.INDEX_UNSET;
|
||||||
}
|
}
|
||||||
int periodId = (int) uid;
|
int periodId = (int) uid;
|
||||||
return periodId < firstPeriodId || periodId >= firstPeriodId + getPeriodCount()
|
int periodIndex = periodId - firstPeriodId;
|
||||||
? C.INDEX_UNSET : (periodId - firstPeriodId);
|
return periodIndex < 0 || periodIndex >= getPeriodCount() ? C.INDEX_UNSET : periodIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
private long getAdjustedWindowDefaultStartPositionUs(long defaultPositionProjectionUs) {
|
private long getAdjustedWindowDefaultStartPositionUs(long defaultPositionProjectionUs) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user