Commit 770ad7f0 by Oliver Woodman

Fix edge case in HlsSampleSource.

1. prepare() needs to load a TsChunk to actually prepare the source.
2. Source is prepared, but no tracks are enabled (this is why it's
   an edge case - no-one is likely to be doing this!).
3. The TsChunk load completes.

We should not load additional chunks in this case.
parent dd5eabdf
......@@ -345,7 +345,12 @@ public class HlsSampleSource implements SampleSource, Loader.Callback {
if (!currentLoadableExceptionFatal) {
clearCurrentLoadable();
}
maybeStartLoading();
if (enabledTrackCount > 0) {
maybeStartLoading();
} else {
clearState();
allocator.trim(0);
}
}
@Override
......
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