mirror of
https://github.com/aler9/gortsplib
synced 2025-10-16 12:10:48 +08:00
stop normalizing H264 PTS
This commit is contained in:
@@ -25,7 +25,6 @@ type mpegtsEncoder struct {
|
||||
mux *astits.Muxer
|
||||
dtsExtractor *h264.DTSExtractor
|
||||
firstIDRReceived bool
|
||||
startPTS time.Duration
|
||||
}
|
||||
|
||||
// newMPEGTSEncoder allocates a mpegtsEncoder.
|
||||
@@ -100,12 +99,9 @@ func (e *mpegtsEncoder) encode(nalus [][]byte, pts time.Duration) error {
|
||||
}
|
||||
|
||||
e.firstIDRReceived = true
|
||||
e.startPTS = pts
|
||||
e.dtsExtractor = h264.NewDTSExtractor()
|
||||
}
|
||||
|
||||
pts -= e.startPTS
|
||||
|
||||
dts, err := e.dtsExtractor.Extract(filteredNALUs, pts)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user