Two small fixes for HLS.
1. Clear prefixFlags when a NAL unit is found. 2. continueBuffering should return true if loading is finished.
This commit is contained in:
parent
6d14fc3330
commit
d6ebd49c63
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user