align PacketPTS() and PacketNTP(); add example (#374)

This commit is contained in:
Alessandro Ros
2023-08-22 20:53:23 +02:00
committed by GitHub
parent cab426e350
commit 29ddbbbbf5
23 changed files with 155 additions and 66 deletions

View File

@@ -58,7 +58,8 @@ func main() {
// called when a RTP packet arrives
c.OnPacketRTP(medi, forma, func(pkt *rtp.Packet) {
pts, ok := c.PacketPTS(forma, pkt)
// decode timestamp
pts, ok := c.PacketPTS(medi, pkt)
if !ok {
return
}