1
Fork 0

Refresh layer info after adjusting in down.Write.

Otherwise we might act on outdated info, which could cause a spurious
drop.
This commit is contained in:
Juliusz Chroboczek 2021-08-03 03:15:08 +02:00
parent 3d21a79880
commit 200c0dd68c
1 changed files with 1 additions and 0 deletions

View File

@ -238,6 +238,7 @@ func (down *rtpDownTrack) Write(buf []byte) (int, error) {
}
down.setLayerInfo(layer)
down.adjustLayer()
layer = down.getLayerInfo()
}
if flags.Start && (layer.tid != layer.wantedTid) {
if layer.wantedTid < layer.tid || flags.TidUpSync {