Commit 8c07847b by Oliver Woodman

Properly propagate errors that occur during preparation.

parent b501f8ab
...@@ -82,9 +82,7 @@ public class HlsSampleSource implements SampleSource, Loader.Callback { ...@@ -82,9 +82,7 @@ public class HlsSampleSource implements SampleSource, Loader.Callback {
loader = new Loader("Loader:HLS"); loader = new Loader("Loader:HLS");
} }
continueBufferingInternal(); continueBufferingInternal();
if (extractors.isEmpty()) { if (!extractors.isEmpty()) {
return false;
}
TsExtractor extractor = extractors.getFirst(); TsExtractor extractor = extractors.getFirst();
if (extractor.isPrepared()) { if (extractor.isPrepared()) {
trackCount = extractor.getTrackCount(); trackCount = extractor.getTrackCount();
...@@ -98,6 +96,10 @@ public class HlsSampleSource implements SampleSource, Loader.Callback { ...@@ -98,6 +96,10 @@ public class HlsSampleSource implements SampleSource, Loader.Callback {
} }
prepared = true; prepared = true;
} }
}
if (!prepared && currentLoadableException != null) {
throw currentLoadableException;
}
return prepared; return prepared;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment