Commit d6ebd49c by Oliver Woodman

Two small fixes for HLS.

1. Clear prefixFlags when a NAL unit is found.
2. continueBuffering should return true if loading is finished.
parent 6d14fc33
......@@ -164,7 +164,7 @@ public class HlsSampleSource implements SampleSource, Loader.Callback {
if (!extractors.isEmpty()) {
discardSamplesForDisabledTracks(extractors.getFirst(), downstreamPositionUs);
}
return continueBufferingInternal();
return loadingFinished || continueBufferingInternal();
}
private boolean continueBufferingInternal() throws IOException {
......
......@@ -171,6 +171,9 @@ public final class Mp4Util {
// loop advance the index by three.
} else if (data[i - 2] == 0 && data[i - 1] == 0 && data[i] == 1
&& matchesType(data, i + 1, type)) {
if (prefixFlags != null) {
clearPrefixFlags(prefixFlags);
}
return i - 2;
} else {
// There isn't a NAL prefix here, but there might be at the next position. We should
......
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