mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2025-10-09 02:00:24 +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)]
|
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
|
var payloads [][]byte
|
||||||
if track.Codec.Name == streamer.CodecH264 {
|
if track.Codec.Name == streamer.CodecH264 {
|
||||||
|
Reference in New Issue
Block a user