Commit 200c0dd6 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Refresh layer info after adjusting in down.Write.

Otherwise we might act on outdated info, which could cause a spurious
drop.
parent 3d21a798
...@@ -238,6 +238,7 @@ func (down *rtpDownTrack) Write(buf []byte) (int, error) { ...@@ -238,6 +238,7 @@ func (down *rtpDownTrack) Write(buf []byte) (int, error) {
} }
down.setLayerInfo(layer) down.setLayerInfo(layer)
down.adjustLayer() down.adjustLayer()
layer = down.getLayerInfo()
} }
if flags.Start && (layer.tid != layer.wantedTid) { if flags.Start && (layer.tid != layer.wantedTid) {
if layer.wantedTid < layer.tid || flags.TidUpSync { if layer.wantedTid < layer.tid || flags.TidUpSync {
......
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