1
0
Fork 0
forked from External/mediamtx

rtmp: fix error when reading metadata (#3302)

some rtmp client will send set chunk size after publish stream
This commit is contained in:
xjr20042 2024-04-30 03:49:38 +08:00 committed by GitHub
parent 1204f76eb7
commit 8b51ca9c8b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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