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:
Raja Subramanian
2025-08-16 00:18:38 +05:30
committed by GitHub
parent 11b240d67d
commit d500806eed
2 changed files with 23 additions and 0 deletions
+6
View File
@@ -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
}