rtmp: fix decoding of chunk3 + chunk3

This commit is contained in:
aler9 2022-07-19 16:42:11 +02:00
parent 9e6abc6e9f
commit f7c08f577a
3 changed files with 197 additions and 299 deletions

View file

@ -201,6 +201,11 @@ func (rc *readerChunkStream) readMessage(typ byte) (*Message, error) {
v1 := *rc.curTimestamp + *rc.curTimestampDelta
rc.curTimestamp = &v1
if *rc.curBodyLen != uint32(len(c3.Body)) {
rc.curBody = &c3.Body
return nil, errMoreChunksNeeded
}
return &Message{
Timestamp: time.Duration(*rc.curTimestamp) * time.Millisecond,
Type: *rc.curType,