修复MessageStreamID没有赋值导致的push错误

This commit is contained in:
dexter
2023-02-02 18:01:06 +08:00
parent c4bc6d9742
commit 4615ca2472

View File

@@ -121,6 +121,8 @@ func (pusher *RTMPPusher) Push() error {
case Response_Result, Response_OnStatus:
if response, ok := msg.MsgData.(*ResponseCreateStreamMessage); ok {
pusher.StreamID = response.StreamId
pusher.audio.MessageStreamID = pusher.StreamID
pusher.video.MessageStreamID = pusher.StreamID
URL, _ := url.Parse(pusher.RemoteURL)
_, streamPath, _ := strings.Cut(URL.Path, "/")
_, streamPath, _ = strings.Cut(streamPath, "/")