Fix 400 response on PLAY for Reolink Doorbell #562
This commit is contained in:
@@ -86,7 +86,7 @@ func (c *Conn) packetWriter(codec *core.Codec, channel, payloadType uint8) core.
|
||||
}
|
||||
|
||||
handlerFunc := func(packet *rtp.Packet) {
|
||||
if c.state == StateNone {
|
||||
if c.state == StateNone || !c.playOK {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -102,6 +102,10 @@ func (c *Conn) packetWriter(codec *core.Codec, channel, payloadType uint8) core.
|
||||
Payload: packet.Payload,
|
||||
}
|
||||
|
||||
if !video {
|
||||
packet.Marker = true // better to have marker on all audio packets
|
||||
}
|
||||
|
||||
size := 12 + len(packet.Payload)
|
||||
|
||||
if n+4+size > len(buf) {
|
||||
@@ -130,7 +134,7 @@ func (c *Conn) packetWriter(codec *core.Codec, channel, payloadType uint8) core.
|
||||
|
||||
n += 4 + size
|
||||
|
||||
if video && !packet.Marker {
|
||||
if !packet.Marker {
|
||||
return // collect continious video packets to buffer
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user