mirror of
https://github.com/Monibuca/plugin-rtsp.git
synced 2025-09-27 12:02:20 +08:00
fix:修改rtsp插件作为服务端出流时,ssrc为0的bug
This commit is contained in:
@@ -75,7 +75,7 @@ func (sh *RTSPServer) OnDescribe(ctx *gortsplib.ServerHandlerOnDescribeCtx) (*ba
|
|||||||
sub.Type = "RTSP pull"
|
sub.Type = "RTSP pull"
|
||||||
sub.vt = s.WaitVideoTrack("h264", "h265")
|
sub.vt = s.WaitVideoTrack("h264", "h265")
|
||||||
sub.at = s.WaitAudioTrack("aac", "pcma", "pcmu")
|
sub.at = s.WaitAudioTrack("aac", "pcma", "pcmu")
|
||||||
ssrc := uintptr(unsafe.Pointer(stream))
|
ssrc := uintptr(unsafe.Pointer(&stream))
|
||||||
var trackIds = 0
|
var trackIds = 0
|
||||||
if sub.vt != nil {
|
if sub.vt != nil {
|
||||||
trackId := trackIds
|
trackId := trackIds
|
||||||
@@ -100,7 +100,7 @@ func (sh *RTSPServer) OnDescribe(ctx *gortsplib.ServerHandlerOnDescribeCtx) (*ba
|
|||||||
for i, nalu := range pack.NALUs {
|
for i, nalu := range pack.NALUs {
|
||||||
var samples uint32
|
var samples uint32
|
||||||
if i == len(pack.NALUs)-1 {
|
if i == len(pack.NALUs)-1 {
|
||||||
samples = (ts-st)*90
|
samples = (ts - st) * 90
|
||||||
} else {
|
} else {
|
||||||
samples = 0
|
samples = 0
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user