decode RTP time globally

This commit is contained in:
aler9
2023-08-14 13:12:38 +02:00
committed by Alessandro Ros
parent 95f58fa6b6
commit 8b047b545b
100 changed files with 703 additions and 993 deletions

View File

@@ -97,11 +97,12 @@ func main() {
panic(err)
}
// called when a RTP packet arrives
saveCount := 0
// called when a RTP packet arrives
c.OnPacketRTP(medi, forma, func(pkt *rtp.Packet) {
// extract access units from RTP packets
au, _, err := rtpDec.Decode(pkt)
au, err := rtpDec.Decode(pkt)
if err != nil {
if err != rtph264.ErrNonStartingPacketAndNoPrevious && err != rtph264.ErrMorePacketsNeeded {
log.Printf("ERR: %v", err)