mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
align PacketPTS() and PacketNTP(); add example (#374)
This commit is contained in:
@@ -116,7 +116,8 @@ func (sh *serverHandler) OnRecord(ctx *gortsplib.ServerHandlerOnRecordCtx) (*bas
|
||||
|
||||
// called when receiving a RTP packet
|
||||
ctx.Session.OnPacketRTP(sh.media, sh.format, func(pkt *rtp.Packet) {
|
||||
pts, ok := ctx.Session.PacketPTS(sh.format, pkt)
|
||||
// decode timestamp
|
||||
pts, ok := ctx.Session.PacketPTS(sh.media, pkt)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user