Commit 725337da by andrewlewis Committed by Oliver Woodman

Fix VOD to live transitions.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130755346
parent f2ee7ef0
......@@ -1051,7 +1051,7 @@ import java.io.IOException;
private void maybeContinueLoading() {
long nextLoadPositionUs = loadingPeriod.mediaPeriod.getNextLoadPositionUs();
if (nextLoadPositionUs != C.END_OF_SOURCE_US) {
long positionUs = internalPositionUs - loadingPeriod.offsetUs;
long positionUs = internalPositionUs - loadingPeriod.offsetUs + loadingPeriod.startPositionUs;
long bufferedDurationUs = nextLoadPositionUs - positionUs;
boolean continueLoading = loadControl.shouldContinueLoading(bufferedDurationUs);
setIsLoading(continueLoading);
......
......@@ -226,7 +226,7 @@ public final class ConcatenatingMediaSource implements MediaSource {
@Override
public long getWindowOffsetInFirstPeriodUs(int windowIndex) {
int sourceIndex = getSourceIndexForWindow(windowIndex);
int firstWindowIndexInSource = getFirstPeriodIndexInSource(sourceIndex);
int firstWindowIndexInSource = getFirstWindowIndexInSource(sourceIndex);
return timelines[sourceIndex].getWindowOffsetInFirstPeriodUs(
windowIndex - firstWindowIndexInSource);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment