mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
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
2 changed files with 4 additions and 1 deletions
|
|
@ -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…
Reference in a new issue