修复sps pps vps为空

This commit is contained in:
banshan
2021-06-24 16:35:57 +08:00
parent dfe462a7d1
commit 0c8bd62e81
2 changed files with 4 additions and 4 deletions

View File

@@ -169,7 +169,7 @@ func (rtsp *RTSP) setVideoTrack() {
} 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.ASdp.SPS, rtsp.ASdp.PPS}})
rtsp.RtpVideo.PushNalu(VideoPack{NALUs: [][]byte{rtsp.VSdp.VPS, rtsp.VSdp.SPS, rtsp.VSdp.PPS}})
}
}
}