mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2025-10-08 09:40:14 +08:00
Fix timestamp for RTMP
This commit is contained in:
@@ -129,7 +129,8 @@ func (c *Client) Handle() (err error) {
|
||||
|
||||
track := c.tracks[int(pkt.Idx)]
|
||||
|
||||
timestamp := uint32(pkt.Time / time.Duration(track.Codec.ClockRate))
|
||||
// convert seconds to RTP timestamp
|
||||
timestamp := uint32(pkt.Time * time.Duration(track.Codec.ClockRate) / time.Second)
|
||||
|
||||
var payloads [][]byte
|
||||
if track.Codec.Name == streamer.CodecH264 {
|
||||
|
Reference in New Issue
Block a user