Merge pull request #343 from ixugo/dev

[opt] 数据有效性长度检查,防止音频流无数据时 panic
pull/345/head
yoko 11 months ago committed by GitHub
commit 90c1075520
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -300,6 +300,9 @@ func (r *AvPacket2RtmpRemuxer) FeedAvPacket(pkt base.AvPacket) {
}
length := len(pkt.Payload) - 5 // -7+2
if length < 7 {
return
}
payload := make([]byte, length)
payload[0] = 0xAF
payload[1] = base.RtmpAacPacketTypeRaw

Loading…
Cancel
Save