From 89c438078e54bc6426d294c2ddc94436a5901a05 Mon Sep 17 00:00:00 2001 From: olly Date: Wed, 5 Oct 2016 07:15:41 -0700 Subject: [PATCH] Fix retry crash in edge case Configuration of retry currently fails if all of the following are true, which is highly unlikely but does occur in the ref'd issue. 1. Loading/extraction fails 2. Neither length of stream of a seek map is known 3. At least one track has been output by the extractor Issue: #1899 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=135228687 --- .../google/android/exoplayer2/source/ExtractorMediaPeriod.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/java/com/google/android/exoplayer2/source/ExtractorMediaPeriod.java b/library/src/main/java/com/google/android/exoplayer2/source/ExtractorMediaPeriod.java index e1945c1a79..49f2cffca5 100644 --- a/library/src/main/java/com/google/android/exoplayer2/source/ExtractorMediaPeriod.java +++ b/library/src/main/java/com/google/android/exoplayer2/source/ExtractorMediaPeriod.java @@ -456,7 +456,7 @@ import java.util.Arrays; lastSeekPositionUs = 0; notifyReset = prepared; for (int i = 0; i < sampleQueues.length; i++) { - sampleQueues[i].reset(trackEnabledStates[i]); + sampleQueues[i].reset(!prepared || trackEnabledStates[i]); } loadable.setLoadPosition(0); }