No sync when starting from nothing (#2191)
When starting from scratch (like mute -> unmute), it is possible that the check sync does not detect a broken chain. That results in PLIs not being sent and the video frozen till a gratuitous key frame arrives. Unclear why there are not PLIs from client side. That is something else to dig into.
This commit is contained in:
@@ -297,12 +297,19 @@ func (d *DependencyDescriptor) updateActiveDecodeTargets(activeDecodeTargetsBitm
|
||||
|
||||
func (d *DependencyDescriptor) CheckSync() (locked bool, layer int32) {
|
||||
layer = d.GetRequestSpatial()
|
||||
if !d.currentLayer.IsValid() {
|
||||
// always declare not locked when trying to resume from nothing
|
||||
return false, layer
|
||||
}
|
||||
|
||||
d.decodeTargetsLock.RLock()
|
||||
defer d.decodeTargetsLock.RUnlock()
|
||||
for _, dt := range d.decodeTargets {
|
||||
if dt.Active() && dt.Layer.Spatial == layer && dt.Valid() {
|
||||
d.logger.Debugw(fmt.Sprintf("checking sync, matching decode target, layer: %d, dt: %s, dts: %+v", layer, dt, d.decodeTargets))
|
||||
return true, layer
|
||||
}
|
||||
}
|
||||
|
||||
return false, layer
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user