Handle no codecs in track info. (#3859)
* Handle no codecs in track info. Not sure how it happens, but seeing a panic caused by no codecs in track info. Avoiding that and logging information when it happens. * log request
This commit is contained in:
@@ -2741,6 +2741,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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user