Commit b6036460 by hoangtc Committed by Oliver Woodman

Fix an issue with seeking that can lead to STATE_END not delivered.

GitHub: #1897

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174841175
parent 7f135f2c
......@@ -63,7 +63,11 @@ public final class CompositeSequenceableLoader implements SequenceableLoader {
break;
}
for (SequenceableLoader loader : loaders) {
if (loader.getNextLoadPositionUs() == nextLoadPositionUs) {
long loaderNextLoadPositionUs = loader.getNextLoadPositionUs();
boolean isLoaderBehind =
loaderNextLoadPositionUs != C.TIME_END_OF_SOURCE
&& loaderNextLoadPositionUs <= positionUs;
if (loaderNextLoadPositionUs == nextLoadPositionUs || isLoaderBehind) {
madeProgressThisIteration |= loader.continueLoading(positionUs);
}
}
......
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