Rewrite mediaSamplesAtTimestamps to fix B-frame bug, fix incorrect timestamps when cloning samples

This commit is contained in:
Vanilagy
2025-05-09 14:20:29 +02:00
parent 865fdcf110
commit 8bca9b0217
4 changed files with 126 additions and 77 deletions
+4 -5
View File
@@ -28,11 +28,10 @@ export class EncodedPacket {
/** The duration of this packet in seconds. */
public readonly duration: number,
/**
* The sequence number of this packet. The sequence number indicates the decode order of the packets. Packet A
* must be decoded before packet B if A has a lower sequence number than B. If two packets have the same
* sequence number, they are the same packet. Otherwise, sequence numbers are arbitrary and are not guaranteed
* to have any meaning besides their relative ordering. Negative sequence numbers mean the sequence number
* is undefined.
* The sequence number indicates the decode order of the packets. Packet A must be decoded before packet B if A
* has a lower sequence number than B. If two packets have the same sequence number, they are the same packet.
* Otherwise, sequence numbers are arbitrary and are not guaranteed to have any meaning besides their relative
* ordering. Negative sequence numbers mean the sequence number is undefined.
*/
public readonly sequenceNumber = -1,
/**