Commit 629edc2b by tonihei Committed by Oliver Woodman

Remove needsContinueLoading from ExoPlayerImplInternal

The same effect can be achieved by checking the isLoading variable of ExoPlayerImplInternal
because this variable is in almost all cases set simultaneously with loadingMediaPeriodHolder.needsContinueLoading.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158697948
parent 58280f97
...@@ -1198,7 +1198,7 @@ import java.io.IOException; ...@@ -1198,7 +1198,7 @@ import java.io.IOException;
maybeUpdateLoadingPeriod(); maybeUpdateLoadingPeriod();
if (loadingPeriodHolder == null || loadingPeriodHolder.isFullyBuffered()) { if (loadingPeriodHolder == null || loadingPeriodHolder.isFullyBuffered()) {
setIsLoading(false); setIsLoading(false);
} else if (loadingPeriodHolder != null && loadingPeriodHolder.needsContinueLoading) { } else if (loadingPeriodHolder != null && !isLoading) {
maybeContinueLoading(); maybeContinueLoading();
} }
...@@ -1394,10 +1394,7 @@ import java.io.IOException; ...@@ -1394,10 +1394,7 @@ import java.io.IOException;
boolean continueLoading = loadControl.shouldContinueLoading(bufferedDurationUs); boolean continueLoading = loadControl.shouldContinueLoading(bufferedDurationUs);
setIsLoading(continueLoading); setIsLoading(continueLoading);
if (continueLoading) { if (continueLoading) {
loadingPeriodHolder.needsContinueLoading = false;
loadingPeriodHolder.mediaPeriod.continueLoading(loadingPeriodPositionUs); loadingPeriodHolder.mediaPeriod.continueLoading(loadingPeriodPositionUs);
} else {
loadingPeriodHolder.needsContinueLoading = true;
} }
} }
} }
...@@ -1506,7 +1503,6 @@ import java.io.IOException; ...@@ -1506,7 +1503,6 @@ import java.io.IOException;
public boolean prepared; public boolean prepared;
public boolean hasEnabledTracks; public boolean hasEnabledTracks;
public MediaPeriodHolder next; public MediaPeriodHolder next;
public boolean needsContinueLoading;
public TrackSelectorResult trackSelectorResult; public TrackSelectorResult trackSelectorResult;
private final Renderer[] renderers; private final Renderer[] renderers;
......
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