Fix timestamp for RTMP

This commit is contained in:
Alexey Khit
2022-10-05 10:48:37 +03:00
parent a81160bea1
commit 4134f2a89c

View File

@@ -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 {