web/encode: skip reader if stream was skipped
This commit is contained in:
parent
c966cf36e7
commit
f3a67554ff
1 changed files with 5 additions and 1 deletions
|
@ -222,7 +222,11 @@ export default class EncodeLibAV extends LibAVWrapper {
|
|||
await libav.ff_write_multi(output_ctx, write_pkt, starterPackets);
|
||||
|
||||
let writePromise = Promise.resolve();
|
||||
await Promise.all(pipes.map(async (_, i) => {
|
||||
await Promise.all(pipes.map(async (pipe, i) => {
|
||||
if (pipe === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
while (true) {
|
||||
const { done, value } = await readers[i].read();
|
||||
if (done) break;
|
||||
|
|
Loading…
Reference in a new issue