When a stream contained an Opus, MPEG-4 audio or AC3 track, timestamp in the segment file name was increasing at twice the speed.
This commit is contained in:
@@ -611,7 +611,7 @@ func (f *formatFMP4) initialize() bool {
|
||||
Payload: packet,
|
||||
},
|
||||
dts: pts,
|
||||
ntp: tunit.NTP.Add(timestampToDuration(pts, clockRate)),
|
||||
ntp: tunit.NTP.Add(timestampToDuration(pts-tunit.PTS, clockRate)),
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -649,7 +649,7 @@ func (f *formatFMP4) initialize() bool {
|
||||
Payload: au,
|
||||
},
|
||||
dts: pts,
|
||||
ntp: tunit.NTP.Add(timestampToDuration(pts, clockRate)),
|
||||
ntp: tunit.NTP.Add(timestampToDuration(pts-tunit.PTS, clockRate)),
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -771,7 +771,7 @@ func (f *formatFMP4) initialize() bool {
|
||||
Payload: frame,
|
||||
},
|
||||
dts: pts,
|
||||
ntp: tunit.NTP.Add(timestampToDuration(pts, clockRate)),
|
||||
ntp: tunit.NTP.Add(timestampToDuration(pts-tunit.PTS, clockRate)),
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user