mirror of
https://github.com/androidx/media.git
synced 2025-05-15 11:39:56 +08:00
Fix infinite loop -> ANR at end of HLS playbacks
continueLoading shouldn't return true unless it's done something. Always returning true if endOfStream was causing CompositeSequenceableLoader.continueLoading to loop forever. It looks like the same issue exists in ChunkSampleStream as well, although I can't seem to provoke DASH or SS playbacks into doing anything bad as a result. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=139559834
This commit is contained in:
parent
35054f8f7c
commit
d890c2f48f
@ -251,7 +251,7 @@ public class ChunkSampleStream<T extends ChunkSource> implements SampleStream, S
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean continueLoading(long positionUs) {
|
public boolean continueLoading(long positionUs) {
|
||||||
if (loader.isLoading()) {
|
if (loadingFinished || loader.isLoading()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,7 +329,7 @@ import java.util.LinkedList;
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean continueLoading(long positionUs) {
|
public boolean continueLoading(long positionUs) {
|
||||||
if (loader.isLoading()) {
|
if (loadingFinished || loader.isLoading()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user