mirror of
https://github.com/Monibuca/plugin-rtmp.git
synced 2025-10-05 07:27:14 +08:00
🐛 FIX: 修复与srs服务器互联不通的问题
This commit is contained in:
18
msg.go
18
msg.go
@@ -334,7 +334,9 @@ func decodeCommandAMF0(chunk *Chunk) {
|
||||
chunk.MsgData = response
|
||||
}
|
||||
case "FCPublish", "FCUnpublish":
|
||||
fallthrough
|
||||
default:
|
||||
chunk.MsgData = &struct{ CommandMessage }{cmdMsg}
|
||||
RTMPPlugin.Info("decode command amf0 ", zap.String("cmd", cmd))
|
||||
}
|
||||
}
|
||||
@@ -505,16 +507,16 @@ func (msg *PlayMessage) Encode() []byte {
|
||||
amf.writeNumber(float64(msg.TransactionId))
|
||||
amf.writeNull()
|
||||
amf.writeString(msg.StreamName)
|
||||
amf.writeNumber(-2000)
|
||||
// if msg.Start > 0 {
|
||||
// amf.writeNumber(msg.Start)
|
||||
// }
|
||||
|
||||
if msg.Start > 0 {
|
||||
amf.writeNumber(msg.Start)
|
||||
}
|
||||
// if msg.Duration > 0 {
|
||||
// amf.writeNumber(msg.Duration)
|
||||
// }
|
||||
|
||||
if msg.Duration > 0 {
|
||||
amf.writeNumber(msg.Duration)
|
||||
}
|
||||
|
||||
amf.writeBool(msg.Reset)
|
||||
// amf.writeBool(msg.Reset)
|
||||
return amf.Buffer
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user