shinyoshiaki / werift-webrtc

WebRTC Implementation for TypeScript (Node.js), includes ICE/DTLS/SCTP/RTP/SRTP/WEBM/MP4
MIT License
485 stars 32 forks source link

replace rtp option to signal the stream contains a discontunity #267

Closed koush closed 2 years ago

koush commented 2 years ago

This is necessary if replace rtp is called during a h264 fragmentation unit. The decoder will fail to decode until a full key frame interval without this change.

koush commented 2 years ago

I have similar rtp stitching code for a non-webrtc use case, and and what I provided above is what works the best across a variety of decoders.