Skip to content

Commit

Permalink
rtmp: fix error when reading metadata (#3302)
Browse files Browse the repository at this point in the history
some rtmp client will send set chunk size after publish stream
  • Loading branch information
xjr20042 authored Apr 29, 2024
1 parent 1204f76 commit 8b51ca9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/protocols/rtmp/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,11 @@ func (r *Reader) readTracks() (format.Format, format.Format, error) {
}
}

// skip SetChunkSize
if _, ok := msg.(*message.SetChunkSize); ok {
continue
}

if data, ok := msg.(*message.DataAMF0); ok && len(data.Payload) >= 1 {
payload := data.Payload

Expand Down

0 comments on commit 8b51ca9

Please sign in to comment.