av-merge: End stream correctly when last segments do not overlap
In this video at 480p: https://www.youtube.com/watch?v=6bnanI9jXps There is an extremely tiny audio segment from 30.00018140589569 to 30.06981859410431 after the last video segment ends at 29.99998888888889. Call end of stream when we have all segments until the end, instead of calling it when we are playing the last segment. Signed-off-by: Jesús <heckyel@hyperbola.info>
This commit is contained in:
parent
ef867e3759
commit
9d3ebca622
@ -283,10 +283,9 @@ Stream.prototype.checkBuffer = async function() {
|
||||
|
||||
if (i < this.sidx.entries.length && !this.sidx.entries[i].requested) {
|
||||
this.fetchSegment(i);
|
||||
// We are playing the last segment and we have it.
|
||||
// We have all the segments until the end
|
||||
// Signal the end of stream
|
||||
} else if (currentSegmentIdx == this.sidx.entries.length - 1
|
||||
&& this.sidx.entries[currentSegmentIdx].have) {
|
||||
} else if (i == this.sidx.entries.length) {
|
||||
if (this.streamType == 'audio')
|
||||
this.avMerge.audioEndOfStream();
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user