Commit f4aa86a4 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Switch spatial layers at the right point.

parent d96a48f8
......@@ -271,11 +271,13 @@ func (down *rtpDownTrack) Write(buf []byte) (int, error) {
if flags.Keyframe {
layer.sid = layer.wantedSid
down.setLayerInfo(layer)
} else if flags.SidUpSync {
layer.sid = layer.sid + 1
down.setLayerInfo(layer)
} else {
down.remote.RequestKeyframe()
} else if flags.Sid == layer.sid + 1 {
if flags.SidUpSync {
layer.sid = layer.sid + 1
down.setLayerInfo(layer)
} else {
down.remote.RequestKeyframe()
}
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment