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
@@ -113,7 +113,7 @@ func (c *Producer) Start() error {
Header: rtp.Header{
Timestamp: uint32(ts * 90000),
},
Payload: annexb.EncodeToAVCC(body, false),
Payload: annexb.EncodeToAVCC(body),
}
video.WriteRTP(pkt)
}
@@ -168,7 +168,7 @@ func (c *Producer) probe() error {
}
waitVideo = false
body = annexb.EncodeToAVCC(body, false)
body = annexb.EncodeToAVCC(body)
codec := h264.AVCCToCodec(body)
media = &core.Media{
Kind: core.KindVideo,