mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Fix content position for postroll ads
The position returned by getContentPosition() could be C.TIME_END_OF_SOURCE. Fix the content position stored in MediaPeriodInfos for postroll ads to be the duration of the containing period. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=162322339
This commit is contained in:
parent
5be79d4f42
commit
c28a2a4100
1 changed files with 2 additions and 1 deletions
|
|
@ -223,8 +223,9 @@ import com.google.android.exoplayer2.source.MediaSource.MediaPeriodId;
|
|||
|| !period.isAdAvailable(adGroupCount - 1, 0)) {
|
||||
return null;
|
||||
}
|
||||
long contentDurationUs = period.getDurationUs();
|
||||
return getMediaPeriodInfoForAd(currentPeriodId.periodIndex, adGroupCount - 1, 0,
|
||||
currentMediaPeriodInfo.endPositionUs);
|
||||
contentDurationUs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue