mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
decode RTP time globally
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user