Compare commits

...

2 Commits

Author SHA1 Message Date
Cédric Verstraeten
884bc2acc1 Update gortsplib.go 2025-01-04 13:21:26 +01:00
Cédric Verstraeten
11fd041fa9 Update gortsplib.go 2025-01-04 13:04:02 +01:00

View File

@@ -485,7 +485,7 @@ func (g *Golibrtsp) Start(ctx context.Context, streamType string, queue *packets
var filteredAU [][]byte
if g.VideoH264Media != nil && g.VideoH264Forma != nil {
dtsExtractor := h264.NewDTSExtractor2()
//dtsExtractor := h264.NewDTSExtractor2()
g.Client.OnPacketRTP(g.VideoH264Media, g.VideoH264Forma, func(rtppkt *rtp.Packet) {
@@ -580,11 +580,11 @@ func (g *Golibrtsp) Start(ctx context.Context, streamType string, queue *packets
}
// Extract DTS from RTP packets
dts2, err := dtsExtractor.Extract(filteredAU, pts2)
if err != nil {
log.Log.Error("capture.golibrtsp.Start(): " + err.Error())
return
}
//dts2, err := dtsExtractor.Extract(filteredAU, pts2)
//if err != nil {
// log.Log.Error("capture.golibrtsp.Start(): " + err.Error())
// return
//}
pkt := packets.Packet{
IsKeyFrame: idrPresent,
@@ -592,7 +592,7 @@ func (g *Golibrtsp) Start(ctx context.Context, streamType string, queue *packets
Data: enc,
Time: pts2,
TimeLegacy: pts,
CompositionTime: dts2,
CompositionTime: pts2,
Idx: g.VideoH264Index,
IsVideo: true,
IsAudio: false,