Fix AnnexB parsing in some cases

This commit is contained in:
Alex X
2024-08-04 10:18:24 +03:00
parent d559ec0208
commit bd88695e59
7 changed files with 133 additions and 52 deletions
+2 -2
View File
@@ -53,7 +53,7 @@ func (c *Producer) Start() error {
packet := &rtp.Packet{
Header: rtp.Header{Timestamp: c.videoTS},
Payload: annexb.EncodeToAVCC(payload, false),
Payload: annexb.EncodeToAVCC(payload),
}
//log.Printf("[AVC] %v, len: %d, ts: %10d", h265.Types(payload), len(payload), packet.Timestamp)
@@ -146,7 +146,7 @@ func (c *Producer) probe() error {
c.videoTS = binary.LittleEndian.Uint32(ts)
c.videoDT = 90000 / uint32(fps)
payload := annexb.EncodeToAVCC(b[16:], false)
payload := annexb.EncodeToAVCC(b[16:])
c.addVideoTrack(b[4], payload)
case 0xFA: // audio