mirror of
https://github.com/livekit/livekit.git
synced 2026-08-28 13:54:34 +00:00
Merge remote-tracking branch 'origin/master' into raja_pc
This commit is contained in:
@@ -2769,6 +2769,12 @@ func (p *ParticipantImpl) addPendingTrackLocked(req *livekit.AddTrackRequest) *l
|
||||
seenCodecs := make(map[string]struct{})
|
||||
for _, codec := range req.SimulcastCodecs {
|
||||
if codec.Codec == "" {
|
||||
p.pubLogger.Warnw(
|
||||
"simulcast codec without mime type", nil,
|
||||
"trackID", ti.Sid,
|
||||
"track", logger.Proto(ti),
|
||||
"addTrackRequest", logger.Proto(req),
|
||||
)
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
@@ -95,6 +95,17 @@ func (p *ParticipantImpl) populateSdpCid(parsedOffer *sdp.SessionDescription) ([
|
||||
continue
|
||||
}
|
||||
|
||||
if len(info.Codecs) == 0 {
|
||||
p.pubLogger.Warnw(
|
||||
"track without codecs", nil,
|
||||
"trackID", info.Sid,
|
||||
"pendingTrack", p.pendingTracks[signalCid],
|
||||
"media", unmatch,
|
||||
"parsedOffer", parsedOffer,
|
||||
)
|
||||
continue
|
||||
}
|
||||
|
||||
found := false
|
||||
updated := false
|
||||
for _, sdpCodec := range sdpCodecs {
|
||||
@@ -125,6 +136,12 @@ func (p *ParticipantImpl) populateSdpCid(parsedOffer *sdp.SessionDescription) ([
|
||||
|
||||
if updated {
|
||||
p.pendingTracks[signalCid].trackInfos[0] = utils.CloneProto(info)
|
||||
p.pubLogger.Debugw(
|
||||
"pending track SDP cid updated",
|
||||
"signalCid", signalCid,
|
||||
"trackID", info.Sid,
|
||||
"pendingTrack", p.pendingTracks[signalCid],
|
||||
)
|
||||
}
|
||||
p.pendingTracksLock.Unlock()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user