mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Remove HLS chunks based on parts not in playlist anymore
Issue: #5011 PiperOrigin-RevId: 345275266
This commit is contained in:
parent
10b9de8342
commit
affdff65e3
1 changed files with 7 additions and 3 deletions
|
|
@ -767,10 +767,14 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!readOnlyMediaChunks.isEmpty()
|
int newQueueSize = readOnlyMediaChunks.size();
|
||||||
&& chunkSource.getChunkPublicationState(Iterables.getLast(readOnlyMediaChunks))
|
while (newQueueSize > 0
|
||||||
|
&& chunkSource.getChunkPublicationState(readOnlyMediaChunks.get(newQueueSize - 1))
|
||||||
== CHUNK_PUBLICATION_STATE_REMOVED) {
|
== CHUNK_PUBLICATION_STATE_REMOVED) {
|
||||||
discardUpstream(mediaChunks.size() - 1);
|
newQueueSize--;
|
||||||
|
}
|
||||||
|
if (newQueueSize < readOnlyMediaChunks.size()) {
|
||||||
|
discardUpstream(newQueueSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
int preferredQueueSize = chunkSource.getPreferredQueueSize(positionUs, readOnlyMediaChunks);
|
int preferredQueueSize = chunkSource.getPreferredQueueSize(positionUs, readOnlyMediaChunks);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue