mirror of
https://github.com/Monibuca/plugin-rtsp.git
synced 2025-09-26 19:51:14 +08:00
适配3.1
This commit is contained in:
4
main.go
4
main.go
@@ -164,12 +164,12 @@ func (rtsp *RTSP) setVideoTrack() {
|
||||
if rtsp.VSdp.Codec == "H264" {
|
||||
rtsp.RtpVideo = rtsp.NewRTPVideo(7)
|
||||
if len(rtsp.VSdp.SpropParameterSets) > 1 {
|
||||
rtsp.RtpVideo.PushNalu(VideoPack{NALUs: rtsp.VSdp.SpropParameterSets})
|
||||
rtsp.RtpVideo.PushNalu(0, 0, rtsp.VSdp.SpropParameterSets...)
|
||||
}
|
||||
} else if rtsp.VSdp.Codec == "H265" {
|
||||
rtsp.RtpVideo = rtsp.NewRTPVideo(12)
|
||||
if len(rtsp.VSdp.VPS) > 0 {
|
||||
rtsp.RtpVideo.PushNalu(VideoPack{NALUs: [][]byte{rtsp.VSdp.VPS, rtsp.VSdp.SPS, rtsp.VSdp.PPS}})
|
||||
rtsp.RtpVideo.PushNalu(0, 0, rtsp.VSdp.VPS, rtsp.VSdp.SPS, rtsp.VSdp.PPS)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user