Fix check for last period index in ExoPlayerImplInternal

The if clause was never executed because nextLoadingPeriodIndex is set
to C.INDEX_UNSET instead of loadingPeriodIndex + 1.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159948661
This commit is contained in:
tonihei 2017-06-23 07:57:19 -07:00 committed by Oliver Woodman
parent 555eb9d423
commit 363f2414d1

View File

@ -1315,7 +1315,7 @@ import java.io.IOException;
repeatMode);
}
if (newLoadingPeriodIndex >= timeline.getPeriodCount()) {
if (newLoadingPeriodIndex == C.INDEX_UNSET) {
// The next period is not available yet.
mediaSource.maybeThrowSourceInfoRefreshError();
return;