mirror of
https://github.com/androidx/media.git
synced 2025-05-15 19:49:50 +08:00
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.
This commit is contained in:
parent
dd5eabdf4a
commit
770ad7f06f
@ -345,7 +345,12 @@ public class HlsSampleSource implements SampleSource, Loader.Callback {
|
||||
if (!currentLoadableExceptionFatal) {
|
||||
clearCurrentLoadable();
|
||||
}
|
||||
if (enabledTrackCount > 0) {
|
||||
maybeStartLoading();
|
||||
} else {
|
||||
clearState();
|
||||
allocator.trim(0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user