From 5b2f0566a74a7e2ac64895822623e4388ffec172 Mon Sep 17 00:00:00 2001 From: Oliver Woodman Date: Mon, 8 Sep 2014 11:18:36 +0100 Subject: [PATCH] Fix potential cause of infinite-spinner-without-failure. It looks like for the case of self-contained media segments, it's possible to get stuck without failure in the case that the load fails having loaded less than the length of the init data. --- .../com/google/android/exoplayer/chunk/ChunkSampleSource.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/src/main/java/com/google/android/exoplayer/chunk/ChunkSampleSource.java b/library/src/main/java/com/google/android/exoplayer/chunk/ChunkSampleSource.java index c48b6056ef..c59b321c9c 100644 --- a/library/src/main/java/com/google/android/exoplayer/chunk/ChunkSampleSource.java +++ b/library/src/main/java/com/google/android/exoplayer/chunk/ChunkSampleSource.java @@ -318,6 +318,9 @@ public class ChunkSampleSource implements SampleSource, Loader.Listener { } if (!mediaChunk.prepare()) { + if (currentLoadableException != null) { + throw currentLoadableException; + } return NOTHING_READ; }