mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-03 22:03:49 +02:00
Fix test
This commit is contained in:
@@ -703,12 +703,14 @@ test('MPEG-TS muxing with StreamTarget', async () => {
|
|||||||
const frameDuration = 1 / fps;
|
const frameDuration = 1 / fps;
|
||||||
|
|
||||||
for (let i = 0; i < frameCount; i++) {
|
for (let i = 0; i < frameCount; i++) {
|
||||||
await videoSource.add(i * frameDuration, frameDuration);
|
await videoSource.add(i * frameDuration, frameDuration, {
|
||||||
|
keyFrame: true, // Otherwise all packets get written at once due to the DTS logic
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
await output.finalize();
|
await output.finalize();
|
||||||
|
|
||||||
expect(chunks.length).toBe(frameCount);
|
expect(chunks).toHaveLength(frameCount);
|
||||||
|
|
||||||
const buffer = new Uint8Array(nextPos);
|
const buffer = new Uint8Array(nextPos);
|
||||||
nextPos = 0;
|
nextPos = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user