Skip to content

Commit df5efa0

Browse files
committed
Fix test
1 parent ddc826e commit df5efa0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/browser/mpeg-ts-muxing.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,12 +703,14 @@ test('MPEG-TS muxing with StreamTarget', async () => {
703703
const frameDuration = 1 / fps;
704704

705705
for (let i = 0; i < frameCount; i++) {
706-
await videoSource.add(i * frameDuration, frameDuration);
706+
await videoSource.add(i * frameDuration, frameDuration, {
707+
keyFrame: true, // Otherwise all packets get written at once due to the DTS logic
708+
});
707709
}
708710

709711
await output.finalize();
710712

711-
expect(chunks.length).toBe(frameCount);
713+
expect(chunks).toHaveLength(frameCount);
712714

713715
const buffer = new Uint8Array(nextPos);
714716
nextPos = 0;

0 commit comments

Comments
 (0)