av-merge: Use .shift() instead of .pop() in appendQueue for FIFO
.pop() gives LIFO, but FIFO was the intention for appendQueue. O(n) behavior is fine because appendQueue should be very small. Signed-off-by: Jesús <heckyel@hyperbola.info>
This commit is contained in:
parent
85cf943850
commit
30e59081b1
@ -164,7 +164,7 @@ function Stream(avMerge, source, startTime, avRatio) {
|
||||
});
|
||||
this.updateendEvt = addEvent(this.sourceBuffer, 'updateend', (e) => {
|
||||
if (this.appendQueue.length != 0) {
|
||||
this.appendSegment(...this.appendQueue.pop());
|
||||
this.appendSegment(...this.appendQueue.shift());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user