Skip to content
This repository has been archived by the owner on Jun 16, 2020. It is now read-only.

Commit

Permalink
[PRO-414] Workaround to avoid Exoplayer's issues google/ExoPlayer#1695
Browse files Browse the repository at this point in the history
…and google/ExoPlayer#1801: ArrayIndexOutOfBoundsException (Crashlytics issue #11310)
  • Loading branch information
carlospontual committed Nov 8, 2016
1 parent 699a355 commit 858a99a
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,11 @@ private int getLiveNextChunkSequenceNumber(int previousChunkIndex, int oldVarian
double offsetToLiveInstantSecs = 0;
for (int i = previousChunkIndex - oldMediaPlaylist.mediaSequence;
i < oldMediaPlaylist.segments.size(); i++) {
if (i < 0) {
String errorMessage = "previousChunkIndex: " + previousChunkIndex + " oldMediaPlaylist.mediaSequence: " + oldMediaPlaylist.mediaSequence + " oldMediaPlaylist.segments.size(): " + oldMediaPlaylist.segments.size();
Log.w("HlsChunkSource", "Error on getLiveNextChunkSequenceNumber: " + errorMessage);
break;
}
offsetToLiveInstantSecs += oldMediaPlaylist.segments.get(i).durationSecs;
}
long currentTimeMs = SystemClock.elapsedRealtime();
Expand Down

0 comments on commit 858a99a

Please sign in to comment.