1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-09 18:25:58 +01:00

Switch spatial layers at the right point.

This commit is contained in:
Juliusz Chroboczek 2021-08-03 23:21:44 +02:00
parent d96a48f805
commit f4aa86a491

View file

@ -271,7 +271,8 @@ func (down *rtpDownTrack) Write(buf []byte) (int, error) {
if flags.Keyframe {
layer.sid = layer.wantedSid
down.setLayerInfo(layer)
} else if flags.SidUpSync {
} else if flags.Sid == layer.sid + 1 {
if flags.SidUpSync {
layer.sid = layer.sid + 1
down.setLayerInfo(layer)
} else {
@ -279,6 +280,7 @@ func (down *rtpDownTrack) Write(buf []byte) (int, error) {
}
}
}
}
if flags.Tid > layer.tid || flags.Sid > layer.sid ||
(flags.Sid < layer.sid && flags.SidNonReference) {