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.
This commit is contained in:
Oliver Woodman 2014-09-08 11:18:36 +01:00
parent 92e3208121
commit 5b2f0566a7

View File

@ -318,6 +318,9 @@ public class ChunkSampleSource implements SampleSource, Loader.Listener {
} }
if (!mediaChunk.prepare()) { if (!mediaChunk.prepare()) {
if (currentLoadableException != null) {
throw currentLoadableException;
}
return NOTHING_READ; return NOTHING_READ;
} }