mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-20 02:00:05 -08:00
produce same absolute time in RTSP and HLS (#1249)
* add a NTP timestamp to each data unit * use that NTP timestamp in all protocols
This commit is contained in:
parent
7a49b92d9b
commit
e605727c78
15 changed files with 69 additions and 35 deletions
|
|
@ -174,6 +174,7 @@ func (s *rtmpSource) run(ctx context.Context) error {
|
|||
trackID: videoTrackID,
|
||||
pts: tmsg.DTS + tmsg.PTSDelta,
|
||||
nalus: nalus,
|
||||
ntp: time.Now(),
|
||||
})
|
||||
if err != nil {
|
||||
s.Log(logger.Warn, "%v", err)
|
||||
|
|
@ -190,6 +191,7 @@ func (s *rtmpSource) run(ctx context.Context) error {
|
|||
trackID: audioTrackID,
|
||||
pts: tmsg.DTS,
|
||||
aus: [][]byte{tmsg.Payload},
|
||||
ntp: time.Now(),
|
||||
})
|
||||
if err != nil {
|
||||
s.Log(logger.Warn, "%v", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue